home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / talkd.000 / talkd
Tape Archive  |  1994-12-14  |  40.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: talkd

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), file Makefile, mode 100600 , uid 0 , gid 0 , size 522 , seconds 5673441767, user root, group root default
98% file data default
62% TrID TAR - Tape ARchive (GNU) default
37% TrID TAR - Tape ARchive (file) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU) default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4d 61 6b 65 66 69 6c 65 | 00 00 00 00 00 00 00 00 |Makefile|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00000070| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000080| 20 20 20 20 35 32 32 20 | 20 35 36 37 33 34 34 31 | 522 | 5673441|
|00000090| 37 36 37 20 20 31 30 35 | 36 37 00 20 30 00 00 00 |767 105|67. 0...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 43 43 20 3d 20 67 63 63 | 0a 50 52 4f 47 20 3d 20 |CC = gcc|.PROG = |
|00000210| 69 6e 2e 74 61 6c 6b 64 | 0a 4f 42 4a 53 20 3d 20 |in.talkd|.OBJS = |
|00000220| 74 61 6c 6b 64 2e 6f 20 | 61 6e 6e 6f 75 6e 63 65 |talkd.o |announce|
|00000230| 2e 6f 20 70 72 6f 63 65 | 73 73 2e 6f 20 74 61 62 |.o proce|ss.o tab|
|00000240| 6c 65 2e 6f 20 70 72 69 | 6e 74 2e 6f 0a 43 46 4c |le.o pri|nt.o.CFL|
|00000250| 41 47 53 20 3d 20 2d 4f | 32 20 2d 6d 33 38 36 20 |AGS = -O|2 -m386 |
|00000260| 2d 69 6e 63 6c 75 64 65 | 20 2f 75 73 72 2f 69 6e |-include| /usr/in|
|00000270| 63 6c 75 64 65 2f 62 73 | 64 2f 62 73 64 2e 68 20 |clude/bs|d/bsd.h |
|00000280| 2d 49 2f 75 73 72 2f 69 | 6e 63 6c 75 64 65 2f 62 |-I/usr/i|nclude/b|
|00000290| 73 64 20 2d 44 6f 73 6f | 63 6b 61 64 64 72 3d 73 |sd -Doso|ckaddr=s|
|000002a0| 6f 63 6b 61 64 64 72 0a | 4c 44 46 4c 41 47 53 20 |ockaddr.|LDFLAGS |
|000002b0| 3d 20 2d 4e 20 2d 73 0a | 4c 44 4c 49 42 53 20 3d |= -N -s.|LDLIBS =|
|000002c0| 20 2d 6c 62 73 64 0a 0a | 61 6c 6c 3a 20 24 28 50 | -lbsd..|all: $(P|
|000002d0| 52 4f 47 29 0a 0a 24 28 | 50 52 4f 47 29 3a 20 24 |ROG)..$(|PROG): $|
|000002e0| 28 4f 42 4a 53 29 0a 09 | 20 24 28 43 43 29 20 24 |(OBJS)..| $(CC) $|
|000002f0| 28 4c 44 46 4c 41 47 53 | 29 20 2d 6f 20 24 28 50 |(LDFLAGS|) -o $(P|
|00000300| 52 4f 47 29 20 24 28 4f | 42 4a 53 29 20 24 28 4c |ROG) $(O|BJS) $(L|
|00000310| 44 4c 49 42 53 29 0a 0a | 63 6c 65 61 6e 3a 0a 09 |DLIBS)..|clean:..|
|00000320| 72 6d 20 2d 66 20 2a 2e | 6f 20 2a 7e 20 63 6f 72 |rm -f *.|o *~ cor|
|00000330| 65 0a 0a 63 6c 6f 62 62 | 65 72 3a 20 63 6c 65 61 |e..clobb|er: clea|
|00000340| 6e 0a 09 20 72 6d 20 2d | 66 20 24 28 50 52 4f 47 |n.. rm -|f $(PROG|
|00000350| 29 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 52 45 41 44 4d 45 2e 42 | 4f 4d 42 50 52 4f 4f 46 |README.B|OMBPROOF|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 20 20 |....1006|44 . |
|00000470| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000480| 20 20 20 31 30 36 33 20 | 20 35 36 37 33 34 34 34 | 1063 | 5673444|
|00000490| 32 33 37 20 20 31 31 33 | 35 37 00 20 30 00 00 00 |237 113|57. 0...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 54 68 69 73 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |This ver|sion of |
|00000610| 74 68 65 20 42 53 44 20 | 74 61 6c 6b 64 20 73 75 |the BSD |talkd su|
|00000620| 70 70 72 65 73 73 65 73 | 20 56 54 31 30 30 20 28 |ppresses| VT100 (|
|00000630| 66 6c 61 73 68 29 20 62 | 6f 6d 62 73 2e 20 20 54 |flash) b|ombs. T|
|00000640| 68 65 20 75 73 65 72 0a | 62 65 69 6e 67 20 62 6f |he user.|being bo|
|00000650| 6d 62 65 64 20 77 6f 6e | 27 74 20 65 76 65 6e 20 |mbed won|'t even |
|00000660| 73 65 65 20 69 74 2e 20 | 20 57 61 72 6e 69 6e 67 |see it. | Warning|
|00000670| 20 6d 65 73 73 61 67 65 | 73 20 77 69 6c 6c 20 62 | message|s will b|
|00000680| 65 20 77 72 69 74 74 65 | 6e 20 74 6f 20 74 68 65 |e writte|n to the|
|00000690| 0a 73 79 73 6c 6f 67 20 | 74 65 6c 6c 69 6e 67 20 |.syslog |telling |
|000006a0| 77 68 6f 20 74 68 65 20 | 62 6f 6d 62 20 77 61 73 |who the |bomb was|
|000006b0| 20 64 69 72 65 63 74 65 | 64 20 61 74 20 61 6e 64 | directe|d at and|
|000006c0| 20 74 68 65 20 68 6f 73 | 74 20 61 64 64 72 65 73 | the hos|t addres|
|000006d0| 73 20 73 70 65 63 69 66 | 69 65 64 0a 69 6e 20 74 |s specif|ied.in t|
|000006e0| 68 65 20 74 61 6c 6b 20 | 70 61 63 6b 65 74 2e 20 |he talk |packet. |
|000006f0| 20 53 69 6e 63 65 20 74 | 68 69 73 20 63 61 6e 20 | Since t|his can |
|00000700| 62 65 20 66 61 6b 65 64 | 2c 20 69 74 20 69 73 20 |be faked|, it is |
|00000710| 6c 61 62 65 6c 6c 65 64 | 20 27 61 70 70 61 72 65 |labelled| 'appare|
|00000720| 6e 74 6c 79 0a 66 72 6f | 6d 27 2e 20 20 59 6f 75 |ntly.fro|m'. You|
|00000730| 20 63 61 6e 20 6d 61 74 | 63 68 20 74 68 65 20 50 | can mat|ch the P|
|00000740| 49 44 20 6f 66 20 74 68 | 65 20 74 61 6c 6b 64 20 |ID of th|e talkd |
|00000750| 77 69 74 68 20 74 68 65 | 20 50 49 44 20 6f 66 20 |with the| PID of |
|00000760| 74 68 65 20 65 6e 74 72 | 79 20 6d 61 64 65 0a 62 |the entr|y made.b|
|00000770| 79 20 74 63 70 64 20 74 | 6f 20 67 65 74 20 74 68 |y tcpd t|o get th|
|00000780| 65 20 72 65 61 6c 20 68 | 6f 73 74 6e 61 6d 65 2e |e real h|ostname.|
|00000790| 0a 0a 54 6f 20 63 6f 6d | 70 69 6c 65 20 75 6e 64 |..To com|pile und|
|000007a0| 65 72 20 4c 69 6e 75 78 | 20 6a 75 73 74 20 74 79 |er Linux| just ty|
|000007b0| 70 65 20 27 6d 61 6b 65 | 27 2e 20 20 54 6f 20 69 |pe 'make|'. To i|
|000007c0| 6e 73 74 61 6c 6c 2c 20 | 63 6f 70 79 20 74 68 65 |nstall, |copy the|
|000007d0| 20 69 6e 2e 74 61 6c 6b | 64 20 74 68 61 74 0a 69 | in.talk|d that.i|
|000007e0| 73 20 63 72 65 61 74 65 | 64 20 6f 76 65 72 20 2f |s create|d over /|
|000007f0| 75 73 72 2f 73 62 69 6e | 2f 69 6e 2e 74 61 6c 6b |usr/sbin|/in.talk|
|00000800| 64 20 28 6f 72 20 77 68 | 61 74 65 76 65 72 20 69 |d (or wh|atever i|
|00000810| 73 20 6e 6f 72 6d 61 6c | 6c 79 20 69 6e 76 6f 6b |s normal|ly invok|
|00000820| 65 64 20 62 79 20 79 6f | 75 72 0a 69 6e 65 74 64 |ed by yo|ur.inetd|
|00000830| 29 2e 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 61 6e 6e 6f 75 6e 63 65 | 2e 63 00 00 00 00 00 00 |announce|.c......|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00000a70| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00000a80| 20 20 31 34 33 37 36 20 | 20 35 36 37 33 34 34 33 | 14376 | 5673443|
|00000a90| 35 31 36 20 20 31 31 31 | 34 37 00 20 30 00 00 00 |516 111|47. 0...|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00000c10| 28 63 29 20 31 39 38 33 | 20 52 65 67 65 6e 74 73 |(c) 1983| Regents|
|00000c20| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00000c30| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00000c40| 2e 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.. * All| rights |
|00000c50| 72 65 73 65 72 76 65 64 | 2e 0a 20 2a 0a 20 2a 20 |reserved|.. *. * |
|00000c60| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00000c70| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00000c80| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00000c90| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|00000ca0| 75 74 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|00000cb0| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|00000cc0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|00000cd0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|00000ce0| 6e 64 69 74 69 6f 6e 73 | 0a 20 2a 20 61 72 65 20 |nditions|. * are |
|00000cf0| 6d 65 74 3a 0a 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|00000d00| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|00000d10| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00000d20| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00000d30| 63 6f 70 79 72 69 67 68 | 74 0a 20 2a 20 20 20 20 |copyrigh|t. * |
|00000d40| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00000d50| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00000d60| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00000d70| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 20 2a |g discla|imer.. *|
|00000d80| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00000d90| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|00000da0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|00000db0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|00000dc0| 72 69 67 68 74 0a 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|00000dd0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|00000de0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|00000df0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|00000e00| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0a |sclaimer| in the.|
|00000e10| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00000e20| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00000e30| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00000e40| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00000e50| 74 72 69 62 75 74 69 6f | 6e 2e 0a 20 2a 20 33 2e |tributio|n.. * 3.|
|00000e60| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00000e70| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00000e80| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00000e90| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|00000ea0| 66 74 77 61 72 65 0a 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|00000eb0| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|00000ec0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|00000ed0| 64 67 65 6d 65 6e 74 3a | 0a 20 2a 09 54 68 69 73 |dgement:|. *.This|
|00000ee0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|00000ef0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|00000f00| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|00000f10| 65 72 73 69 74 79 20 6f | 66 0a 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00000f20| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00000f30| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00000f40| 62 75 74 6f 72 73 2e 0a | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00000f50| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00000f60| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00000f70| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00000f80| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00000f90| 72 73 0a 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|00000fa0| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|00000fb0| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|00000fc0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|00000fd0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0a 20 | this so|ftware. |
|00000fe0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|00000ff0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|00001000| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0a |ten perm|ission..|
|00001010| 20 2a 0a 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 | *. * TH|IS SOFTW|
|00001020| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00001030| 42 59 20 54 48 45 20 52 | 45 47 45 4e 54 53 20 41 |BY THE R|EGENTS A|
|00001040| 4e 44 20 43 4f 4e 54 52 | 49 42 55 54 4f 52 53 20 |ND CONTR|IBUTORS |
|00001050| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 0a 20 2a |``AS IS'|' AND. *|
|00001060| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 20 | ANY EXP|RESS OR |
|00001070| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00001080| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B|
|00001090| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|000010a0| 4f 2c 20 54 48 45 0a 20 | 2a 20 49 4d 50 4c 49 45 |O, THE. |* IMPLIE|
|000010b0| 44 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |D WARRAN|TIES OF |
|000010c0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|000010d0| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|000010e0| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|000010f0| 50 4f 53 45 0a 20 2a 20 | 41 52 45 20 44 49 53 43 |POSE. * |ARE DISC|
|00001100| 4c 41 49 4d 45 44 2e 20 | 20 49 4e 20 4e 4f 20 45 |LAIMED. | IN NO E|
|00001110| 56 45 4e 54 20 53 48 41 | 4c 4c 20 54 48 45 20 52 |VENT SHA|LL THE R|
|00001120| 45 47 45 4e 54 53 20 4f | 52 20 43 4f 4e 54 52 49 |EGENTS O|R CONTRI|
|00001130| 42 55 54 4f 52 53 20 42 | 45 20 4c 49 41 42 4c 45 |BUTORS B|E LIABLE|
|00001140| 0a 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |. * FOR |ANY DIRE|
|00001150| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00001160| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00001170| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00001180| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0a 20 | CONSEQU|ENTIAL. |
|00001190| 2a 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |* DAMAGE|S (INCLU|
|000011a0| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|000011b0| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|000011c0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|000011d0| 55 54 45 20 47 4f 4f 44 | 53 0a 20 2a 20 4f 52 20 |UTE GOOD|S. * OR |
|000011e0| 53 45 52 56 49 43 45 53 | 3b 20 4c 4f 53 53 20 4f |SERVICES|; LOSS O|
|000011f0| 46 20 55 53 45 2c 20 44 | 41 54 41 2c 20 4f 52 20 |F USE, D|ATA, OR |
|00001200| 50 52 4f 46 49 54 53 3b | 20 4f 52 20 42 55 53 49 |PROFITS;| OR BUSI|
|00001210| 4e 45 53 53 20 49 4e 54 | 45 52 52 55 50 54 49 4f |NESS INT|ERRUPTIO|
|00001220| 4e 29 0a 20 2a 20 48 4f | 57 45 56 45 52 20 43 41 |N). * HO|WEVER CA|
|00001230| 55 53 45 44 20 41 4e 44 | 20 4f 4e 20 41 4e 59 20 |USED AND| ON ANY |
|00001240| 54 48 45 4f 52 59 20 4f | 46 20 4c 49 41 42 49 4c |THEORY O|F LIABIL|
|00001250| 49 54 59 2c 20 57 48 45 | 54 48 45 52 20 49 4e 20 |ITY, WHE|THER IN |
|00001260| 43 4f 4e 54 52 41 43 54 | 2c 20 53 54 52 49 43 54 |CONTRACT|, STRICT|
|00001270| 0a 20 2a 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 4f |. * LIAB|ILITY, O|
|00001280| 52 20 54 4f 52 54 20 28 | 49 4e 43 4c 55 44 49 4e |R TORT (|INCLUDIN|
|00001290| 47 20 4e 45 47 4c 49 47 | 45 4e 43 45 20 4f 52 20 |G NEGLIG|ENCE OR |
|000012a0| 4f 54 48 45 52 57 49 53 | 45 29 20 41 52 49 53 49 |OTHERWIS|E) ARISI|
|000012b0| 4e 47 20 49 4e 20 41 4e | 59 20 57 41 59 0a 20 2a |NG IN AN|Y WAY. *|
|000012c0| 20 4f 55 54 20 4f 46 20 | 54 48 45 20 55 53 45 20 | OUT OF |THE USE |
|000012d0| 4f 46 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 |OF THIS |SOFTWARE|
|000012e0| 2c 20 45 56 45 4e 20 49 | 46 20 41 44 56 49 53 45 |, EVEN I|F ADVISE|
|000012f0| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|00001300| 4c 49 54 59 20 4f 46 0a | 20 2a 20 53 55 43 48 20 |LITY OF.| * SUCH |
|00001310| 44 41 4d 41 47 45 2e 0a | 20 2a 2f 0a 0a 23 69 66 |DAMAGE..| */..#if|
|00001320| 6e 64 65 66 20 6c 69 6e | 74 0a 73 74 61 74 69 63 |ndef lin|t.static|
|00001330| 20 63 68 61 72 20 73 63 | 63 73 69 64 5b 5d 20 3d | char sc|csid[] =|
|00001340| 20 22 40 28 23 29 61 6e | 6e 6f 75 6e 63 65 2e 63 | "@(#)an|nounce.c|
|00001350| 09 35 2e 39 20 28 42 65 | 72 6b 65 6c 65 79 29 20 |.5.9 (Be|rkeley) |
|00001360| 32 2f 32 36 2f 39 31 22 | 3b 0a 23 65 6e 64 69 66 |2/26/91"|;.#endif|
|00001370| 20 2f 2a 20 6e 6f 74 20 | 6c 69 6e 74 20 2a 2f 0a | /* not |lint */.|
|00001380| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 74 |.#includ|e <sys/t|
|00001390| 79 70 65 73 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |ypes.h>.|#include|
|000013a0| 20 3c 73 79 73 2f 73 74 | 61 74 2e 68 3e 0a 23 69 | <sys/st|at.h>.#i|
|000013b0| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 74 69 6d 65 |nclude <|sys/time|
|000013c0| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |.h>.#inc|lude <sy|
|000013d0| 73 2f 77 61 69 74 2e 68 | 3e 0a 23 69 6e 63 6c 75 |s/wait.h|>.#inclu|
|000013e0| 64 65 20 3c 73 79 73 2f | 73 6f 63 6b 65 74 2e 68 |de <sys/|socket.h|
|000013f0| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 70 72 6f 74 |>.#inclu|de <prot|
|00001400| 6f 63 6f 6c 73 2f 74 61 | 6c 6b 64 2e 68 3e 0a 23 |ocols/ta|lkd.h>.#|
|00001410| 69 6e 63 6c 75 64 65 20 | 3c 73 67 74 74 79 2e 68 |include |<sgtty.h|
|00001420| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 65 72 72 6e |>.#inclu|de <errn|
|00001430| 6f 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |o.h>.#in|clude <s|
|00001440| 79 73 6c 6f 67 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |yslog.h>|.#includ|
|00001450| 65 20 3c 75 6e 69 73 74 | 64 2e 68 3e 0a 23 69 6e |e <unist|d.h>.#in|
|00001460| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0a |clude <s|tdio.h>.|
|00001470| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 |#include| <string|
|00001480| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 70 61 |.h>.#inc|lude <pa|
|00001490| 74 68 73 2e 68 3e 0a 0a | 65 78 74 65 72 6e 20 63 |ths.h>..|extern c|
|000014a0| 68 61 72 20 68 6f 73 74 | 6e 61 6d 65 5b 5d 3b 0a |har host|name[];.|
|000014b0| 0a 2f 2a 0a 20 2a 20 41 | 6e 6e 6f 75 6e 63 65 20 |./*. * A|nnounce |
|000014c0| 61 6e 20 69 6e 76 69 74 | 61 74 69 6f 6e 20 74 6f |an invit|ation to|
|000014d0| 20 74 61 6c 6b 2e 0a 20 | 2a 0a 20 2a 20 42 65 63 | talk.. |*. * Bec|
|000014e0| 61 75 73 65 20 74 68 65 | 20 74 74 79 20 64 72 69 |ause the| tty dri|
|000014f0| 76 65 72 20 69 6e 73 69 | 73 74 73 20 6f 6e 20 61 |ver insi|sts on a|
|00001500| 74 74 61 63 68 69 6e 67 | 20 61 20 74 65 72 6d 69 |ttaching| a termi|
|00001510| 6e 61 6c 2d 6c 65 73 73 | 0a 20 2a 20 70 72 6f 63 |nal-less|. * proc|
|00001520| 65 73 73 20 74 6f 20 61 | 6e 79 20 74 65 72 6d 69 |ess to a|ny termi|
|00001530| 6e 61 6c 20 74 68 61 74 | 20 69 74 20 77 72 69 74 |nal that| it writ|
|00001540| 65 73 20 6f 6e 2c 20 77 | 65 20 6d 75 73 74 20 66 |es on, w|e must f|
|00001550| 6f 72 6b 20 61 20 63 68 | 69 6c 64 0a 20 2a 20 74 |ork a ch|ild. * t|
|00001560| 6f 20 70 72 6f 74 65 63 | 74 20 6f 75 72 73 65 6c |o protec|t oursel|
|00001570| 76 65 73 0a 20 2a 2f 0a | 61 6e 6e 6f 75 6e 63 65 |ves. */.|announce|
|00001580| 28 72 65 71 75 65 73 74 | 2c 20 72 65 6d 6f 74 65 |(request|, remote|
|00001590| 5f 6d 61 63 68 69 6e 65 | 29 0a 09 43 54 4c 5f 4d |_machine|)..CTL_M|
|000015a0| 53 47 20 2a 72 65 71 75 | 65 73 74 3b 0a 09 63 68 |SG *requ|est;..ch|
|000015b0| 61 72 20 2a 72 65 6d 6f | 74 65 5f 6d 61 63 68 69 |ar *remo|te_machi|
|000015c0| 6e 65 3b 0a 7b 0a 09 69 | 6e 74 20 70 69 64 2c 20 |ne;.{..i|nt pid, |
|000015d0| 76 61 6c 2c 20 73 74 61 | 74 75 73 3b 0a 0a 09 69 |val, sta|tus;...i|
|000015e0| 66 20 28 28 73 74 72 73 | 74 72 28 72 65 71 75 65 |f ((strs|tr(reque|
|000015f0| 73 74 2d 3e 6c 5f 6e 61 | 6d 65 2c 22 5c 30 33 33 |st->l_na|me,"\033|
|00001600| 22 29 29 7c 7c 28 73 74 | 72 73 74 72 28 72 65 6d |"))||(st|rstr(rem|
|00001610| 6f 74 65 5f 6d 61 63 68 | 69 6e 65 2c 22 5c 30 33 |ote_mach|ine,"\03|
|00001620| 33 22 29 29 29 0a 09 7b | 0a 09 09 69 66 20 28 73 |3")))..{|...if (s|
|00001630| 74 72 73 74 72 28 72 65 | 6d 6f 74 65 5f 6d 61 63 |trstr(re|mote_mac|
|00001640| 68 69 6e 65 2c 22 5c 30 | 33 33 22 29 29 0a 09 09 |hine,"\0|33"))...|
|00001650| 7b 0a 09 09 09 73 79 73 | 6c 6f 67 28 4c 4f 47 5f |{....sys|log(LOG_|
|00001660| 57 41 52 4e 49 4e 47 2c | 20 22 62 6c 6f 63 6b 65 |WARNING,| "blocke|
|00001670| 64 20 56 54 31 30 30 20 | 42 4f 4d 42 20 74 6f 20 |d VT100 |BOMB to |
|00001680| 75 73 65 72 3a 20 25 73 | 20 28 66 72 6f 6d 20 66 |user: %s| (from f|
|00001690| 69 65 6c 64 20 69 6e 20 | 70 61 63 6b 65 74 20 63 |ield in |packet c|
|000016a0| 6f 6e 74 61 69 6e 73 20 | 62 6f 6d 62 29 22 2c 20 |ontains |bomb)", |
|000016b0| 72 65 71 75 65 73 74 2d | 3e 72 5f 6e 61 6d 65 29 |request-|>r_name)|
|000016c0| 3b 0a 09 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 09 |;...} el|se {....|
|000016d0| 73 79 73 6c 6f 67 28 4c | 4f 47 5f 57 41 52 4e 49 |syslog(L|OG_WARNI|
|000016e0| 4e 47 2c 20 22 62 6c 6f | 63 6b 65 64 20 56 54 31 |NG, "blo|cked VT1|
|000016f0| 30 30 20 42 4f 4d 42 20 | 74 6f 20 75 73 65 72 3a |00 BOMB |to user:|
|00001700| 20 25 73 20 28 61 70 70 | 61 72 65 6e 74 6c 79 20 | %s (app|arently |
|00001710| 66 72 6f 6d 3a 20 25 73 | 29 22 2c 20 72 65 71 75 |from: %s|)", requ|
|00001720| 65 73 74 2d 3e 72 5f 6e | 61 6d 65 2c 20 72 65 6d |est->r_n|ame, rem|
|00001730| 6f 74 65 5f 6d 61 63 68 | 69 6e 65 29 3b 0a 09 09 |ote_mach|ine);...|
|00001740| 7d 0a 09 7d 20 65 6c 73 | 65 20 7b 0a 09 09 69 66 |}..} els|e {...if|
|00001750| 20 28 70 69 64 20 3d 20 | 66 6f 72 6b 28 29 29 20 | (pid = |fork()) |
|00001760| 7b 0a 09 09 09 2f 2a 20 | 77 65 20 61 72 65 20 74 |{..../* |we are t|
|00001770| 68 65 20 70 61 72 65 6e | 74 2c 20 73 6f 20 77 61 |he paren|t, so wa|
|00001780| 69 74 20 66 6f 72 20 74 | 68 65 20 63 68 69 6c 64 |it for t|he child|
|00001790| 20 2a 2f 0a 09 09 09 69 | 66 20 28 70 69 64 20 3d | */....i|f (pid =|
|000017a0| 3d 20 2d 31 29 09 09 2f | 2a 20 74 68 65 20 66 6f |= -1)../|* the fo|
|000017b0| 72 6b 20 66 61 69 6c 65 | 64 20 2a 2f 0a 09 09 09 |rk faile|d */....|
|000017c0| 09 72 65 74 75 72 6e 20 | 28 46 41 49 4c 45 44 29 |.return |(FAILED)|
|000017d0| 3b 0a 09 09 09 64 6f 20 | 7b 0a 09 09 09 09 76 61 |;....do |{.....va|
|000017e0| 6c 20 3d 20 77 61 69 74 | 28 26 73 74 61 74 75 73 |l = wait|(&status|
|000017f0| 29 3b 0a 09 09 09 09 69 | 66 20 28 76 61 6c 20 3d |);.....i|f (val =|
|00001800| 3d 20 2d 31 29 20 7b 0a | 09 09 09 09 09 69 66 20 |= -1) {.|.....if |
|00001810| 28 65 72 72 6e 6f 20 3d | 3d 20 45 49 4e 54 52 29 |(errno =|= EINTR)|
|00001820| 0a 09 09 09 09 09 09 63 | 6f 6e 74 69 6e 75 65 3b |.......c|ontinue;|
|00001830| 0a 09 09 09 09 09 2f 2a | 20 73 68 6f 75 6c 64 6e |....../*| shouldn|
|00001840| 27 74 20 68 61 70 70 65 | 6e 20 2a 2f 0a 09 09 09 |'t happe|n */....|
|00001850| 09 09 73 79 73 6c 6f 67 | 28 4c 4f 47 5f 57 41 52 |..syslog|(LOG_WAR|
|00001860| 4e 49 4e 47 2c 20 22 61 | 6e 6e 6f 75 6e 63 65 3a |NING, "a|nnounce:|
|00001870| 20 77 61 69 74 3a 20 25 | 6d 22 29 3b 0a 09 09 09 | wait: %|m");....|
|00001880| 09 09 72 65 74 75 72 6e | 20 28 46 41 49 4c 45 44 |..return| (FAILED|
|00001890| 29 3b 0a 09 09 09 09 7d | 0a 09 09 09 7d 20 77 68 |);.....}|....} wh|
|000018a0| 69 6c 65 20 28 76 61 6c | 20 21 3d 20 70 69 64 29 |ile (val| != pid)|
|000018b0| 3b 0a 09 09 09 69 66 20 | 28 73 74 61 74 75 73 26 |;....if |(status&|
|000018c0| 30 33 37 37 20 3e 20 30 | 29 09 2f 2a 20 77 65 20 |0377 > 0|)./* we |
|000018d0| 77 65 72 65 20 6b 69 6c | 6c 65 64 20 62 79 20 73 |were kil|led by s|
|000018e0| 6f 6d 65 20 73 69 67 6e | 61 6c 20 2a 2f 0a 09 09 |ome sign|al */...|
|000018f0| 09 09 72 65 74 75 72 6e | 20 28 46 41 49 4c 45 44 |..return| (FAILED|
|00001900| 29 3b 0a 09 09 09 2f 2a | 20 47 65 74 20 74 68 65 |);..../*| Get the|
|00001910| 20 73 65 63 6f 6e 64 20 | 62 79 74 65 2c 20 74 68 | second |byte, th|
|00001920| 69 73 20 69 73 20 74 68 | 65 20 65 78 69 74 2f 72 |is is th|e exit/r|
|00001930| 65 74 75 72 6e 20 63 6f | 64 65 20 2a 2f 0a 09 09 |eturn co|de */...|
|00001940| 09 72 65 74 75 72 6e 20 | 28 28 73 74 61 74 75 73 |.return |((status|
|00001950| 20 3e 3e 20 38 29 20 26 | 20 30 33 37 37 29 3b 0a | >> 8) &| 0377);.|
|00001960| 09 09 7d 0a 09 09 2f 2a | 20 77 65 20 61 72 65 20 |..}.../*| we are |
|00001970| 74 68 65 20 63 68 69 6c | 64 2c 20 67 6f 20 61 6e |the chil|d, go an|
|00001980| 64 20 64 6f 20 69 74 20 | 2a 2f 0a 09 09 5f 65 78 |d do it |*/..._ex|
|00001990| 69 74 28 61 6e 6e 6f 75 | 6e 63 65 5f 70 72 6f 63 |it(annou|nce_proc|
|000019a0| 28 72 65 71 75 65 73 74 | 2c 20 72 65 6d 6f 74 65 |(request|, remote|
|000019b0| 5f 6d 61 63 68 69 6e 65 | 29 29 3b 0a 09 7d 0a 7d |_machine|));..}.}|
|000019c0| 0a 09 0a 2f 2a 0a 20 2a | 20 53 65 65 20 69 66 20 |.../*. *| See if |
|000019d0| 74 68 65 20 75 73 65 72 | 20 69 73 20 61 63 63 65 |the user| is acce|
|000019e0| 70 74 69 6e 67 20 6d 65 | 73 73 61 67 65 73 2e 20 |pting me|ssages. |
|000019f0| 49 66 20 73 6f 2c 20 61 | 6e 6e 6f 75 6e 63 65 20 |If so, a|nnounce |
|00001a00| 74 68 61 74 20 0a 20 2a | 20 61 20 74 61 6c 6b 20 |that . *| a talk |
|00001a10| 69 73 20 72 65 71 75 65 | 73 74 65 64 2e 0a 20 2a |is reque|sted.. *|
|00001a20| 2f 0a 61 6e 6e 6f 75 6e | 63 65 5f 70 72 6f 63 28 |/.announ|ce_proc(|
|00001a30| 72 65 71 75 65 73 74 2c | 20 72 65 6d 6f 74 65 5f |request,| remote_|
|00001a40| 6d 61 63 68 69 6e 65 29 | 0a 09 43 54 4c 5f 4d 53 |machine)|..CTL_MS|
|00001a50| 47 20 2a 72 65 71 75 65 | 73 74 3b 0a 09 63 68 61 |G *reque|st;..cha|
|00001a60| 72 20 2a 72 65 6d 6f 74 | 65 5f 6d 61 63 68 69 6e |r *remot|e_machin|
|00001a70| 65 3b 0a 7b 0a 09 69 6e | 74 20 70 69 64 2c 20 73 |e;.{..in|t pid, s|
|00001a80| 74 61 74 75 73 3b 0a 09 | 63 68 61 72 20 66 75 6c |tatus;..|char ful|
|00001a90| 6c 5f 74 74 79 5b 33 32 | 5d 3b 0a 09 46 49 4c 45 |l_tty[32|];..FILE|
|00001aa0| 20 2a 74 66 3b 0a 09 73 | 74 72 75 63 74 20 73 74 | *tf;..s|truct st|
|00001ab0| 61 74 20 73 74 62 75 66 | 3b 0a 0a 09 28 76 6f 69 |at stbuf|;...(voi|
|00001ac0| 64 29 73 70 72 69 6e 74 | 66 28 66 75 6c 6c 5f 74 |d)sprint|f(full_t|
|00001ad0| 74 79 2c 20 22 25 73 2f | 25 73 22 2c 20 5f 50 41 |ty, "%s/|%s", _PA|
|00001ae0| 54 48 5f 44 45 56 2c 20 | 72 65 71 75 65 73 74 2d |TH_DEV, |request-|
|00001af0| 3e 72 5f 74 74 79 29 3b | 0a 09 69 66 20 28 61 63 |>r_tty);|..if (ac|
|00001b00| 63 65 73 73 28 66 75 6c | 6c 5f 74 74 79 2c 20 30 |cess(ful|l_tty, 0|
|00001b10| 29 20 21 3d 20 30 29 0a | 09 09 72 65 74 75 72 6e |) != 0).|..return|
|00001b20| 20 28 46 41 49 4c 45 44 | 29 3b 0a 09 69 66 20 28 | (FAILED|);..if (|
|00001b30| 28 74 66 20 3d 20 66 6f | 70 65 6e 28 66 75 6c 6c |(tf = fo|pen(full|
|00001b40| 5f 74 74 79 2c 20 22 77 | 22 29 29 20 3d 3d 20 4e |_tty, "w|")) == N|
|00001b50| 55 4c 4c 29 0a 09 09 72 | 65 74 75 72 6e 20 28 50 |ULL)...r|eturn (P|
|00001b60| 45 52 4d 49 53 53 49 4f | 4e 5f 44 45 4e 49 45 44 |ERMISSIO|N_DENIED|
|00001b70| 29 3b 0a 09 2f 2a 0a 09 | 20 2a 20 4f 6e 20 66 69 |);../*..| * On fi|
|00001b80| 72 73 74 20 74 74 79 20 | 6f 70 65 6e 2c 20 74 68 |rst tty |open, th|
|00001b90| 65 20 73 65 72 76 65 72 | 20 77 69 6c 6c 20 68 61 |e server| will ha|
|00001ba0| 76 65 0a 09 20 2a 20 69 | 74 27 73 20 70 67 72 70 |ve.. * i|t's pgrp|
|00001bb0| 20 73 65 74 2c 20 73 6f | 20 64 69 73 63 6f 6e 6e | set, so| disconn|
|00001bc0| 65 63 74 20 75 73 20 66 | 72 6f 6d 20 74 68 65 0a |ect us f|rom the.|
|00001bd0| 09 20 2a 20 74 74 79 20 | 62 65 66 6f 72 65 20 77 |. * tty |before w|
|00001be0| 65 20 63 61 74 63 68 20 | 61 20 73 69 67 6e 61 6c |e catch |a signal|
|00001bf0| 2e 0a 09 20 2a 2f 0a 09 | 69 6f 63 74 6c 28 66 69 |... */..|ioctl(fi|
|00001c00| 6c 65 6e 6f 28 74 66 29 | 2c 20 54 49 4f 43 4e 4f |leno(tf)|, TIOCNO|
|00001c10| 54 54 59 2c 20 28 73 74 | 72 75 63 74 20 73 67 74 |TTY, (st|ruct sgt|
|00001c20| 74 79 62 20 2a 29 20 30 | 29 3b 0a 09 69 66 20 28 |tyb *) 0|);..if (|
|00001c30| 66 73 74 61 74 28 66 69 | 6c 65 6e 6f 28 74 66 29 |fstat(fi|leno(tf)|
|00001c40| 2c 20 26 73 74 62 75 66 | 29 20 3c 20 30 29 0a 09 |, &stbuf|) < 0)..|
|00001c50| 09 72 65 74 75 72 6e 20 | 28 50 45 52 4d 49 53 53 |.return |(PERMISS|
|00001c60| 49 4f 4e 5f 44 45 4e 49 | 45 44 29 3b 0a 09 69 66 |ION_DENI|ED);..if|
|00001c70| 20 28 28 73 74 62 75 66 | 2e 73 74 5f 6d 6f 64 65 | ((stbuf|.st_mode|
|00001c80| 26 30 32 30 29 20 3d 3d | 20 30 29 0a 09 09 72 65 |&020) ==| 0)...re|
|00001c90| 74 75 72 6e 20 28 50 45 | 52 4d 49 53 53 49 4f 4e |turn (PE|RMISSION|
|00001ca0| 5f 44 45 4e 49 45 44 29 | 3b 0a 09 70 72 69 6e 74 |_DENIED)|;..print|
|00001cb0| 5f 6d 65 73 67 28 74 66 | 2c 20 72 65 71 75 65 73 |_mesg(tf|, reques|
|00001cc0| 74 2c 20 72 65 6d 6f 74 | 65 5f 6d 61 63 68 69 6e |t, remot|e_machin|
|00001cd0| 65 29 3b 0a 09 66 63 6c | 6f 73 65 28 74 66 29 3b |e);..fcl|ose(tf);|
|00001ce0| 0a 09 72 65 74 75 72 6e | 20 28 53 55 43 43 45 53 |..return| (SUCCES|
|00001cf0| 53 29 3b 0a 7d 0a 0a 23 | 64 65 66 69 6e 65 20 6d |S);.}..#|define m|
|00001d00| 61 78 28 61 2c 62 29 20 | 28 20 28 61 29 20 3e 20 |ax(a,b) |( (a) > |
|00001d10| 28 62 29 20 3f 20 28 61 | 29 20 3a 20 28 62 29 20 |(b) ? (a|) : (b) |
|00001d20| 29 0a 23 64 65 66 69 6e | 65 20 4e 5f 4c 49 4e 45 |).#defin|e N_LINE|
|00001d30| 53 20 35 0a 23 64 65 66 | 69 6e 65 20 4e 5f 43 48 |S 5.#def|ine N_CH|
|00001d40| 41 52 53 20 31 32 30 0a | 0a 2f 2a 0a 20 2a 20 42 |ARS 120.|./*. * B|
|00001d50| 75 69 6c 64 20 61 20 62 | 6c 6f 63 6b 20 6f 66 20 |uild a b|lock of |
|00001d60| 63 68 61 72 61 63 74 65 | 72 73 20 63 6f 6e 74 61 |characte|rs conta|
|00001d70| 69 6e 69 6e 67 20 74 68 | 65 20 6d 65 73 73 61 67 |ining th|e messag|
|00001d80| 65 2e 20 0a 20 2a 20 49 | 74 20 69 73 20 73 65 6e |e. . * I|t is sen|
|00001d90| 74 20 62 6c 61 6e 6b 20 | 66 69 6c 6c 65 64 20 61 |t blank |filled a|
|00001da0| 6e 64 20 69 6e 20 61 20 | 73 69 6e 67 6c 65 20 62 |nd in a |single b|
|00001db0| 6c 6f 63 6b 20 74 6f 0a | 20 2a 20 74 72 79 20 74 |lock to.| * try t|
|00001dc0| 6f 20 6b 65 65 70 20 74 | 68 65 20 6d 65 73 73 61 |o keep t|he messa|
|00001dd0| 67 65 20 69 6e 20 6f 6e | 65 20 70 69 65 63 65 20 |ge in on|e piece |
|00001de0| 69 66 20 74 68 65 20 72 | 65 63 69 70 69 65 6e 74 |if the r|ecipient|
|00001df0| 0a 20 2a 20 69 6e 20 69 | 6e 20 76 69 20 61 74 20 |. * in i|n vi at |
|00001e00| 74 68 65 20 74 69 6d 65 | 0a 20 2a 2f 0a 70 72 69 |the time|. */.pri|
|00001e10| 6e 74 5f 6d 65 73 67 28 | 74 66 2c 20 72 65 71 75 |nt_mesg(|tf, requ|
|00001e20| 65 73 74 2c 20 72 65 6d | 6f 74 65 5f 6d 61 63 68 |est, rem|ote_mach|
|00001e30| 69 6e 65 29 0a 09 46 49 | 4c 45 20 2a 74 66 3b 0a |ine)..FI|LE *tf;.|
|00001e40| 09 43 54 4c 5f 4d 53 47 | 20 2a 72 65 71 75 65 73 |.CTL_MSG| *reques|
|00001e50| 74 3b 0a 09 63 68 61 72 | 20 2a 72 65 6d 6f 74 65 |t;..char| *remote|
|00001e60| 5f 6d 61 63 68 69 6e 65 | 3b 0a 7b 0a 09 73 74 72 |_machine|;.{..str|
|00001e70| 75 63 74 20 74 69 6d 65 | 76 61 6c 20 63 6c 6f 63 |uct time|val cloc|
|00001e80| 6b 3b 0a 09 73 74 72 75 | 63 74 20 74 69 6d 65 7a |k;..stru|ct timez|
|00001e90| 6f 6e 65 20 7a 6f 6e 65 | 3b 0a 09 73 74 72 75 63 |one zone|;..struc|
|00001ea0| 74 20 74 6d 20 2a 6c 6f | 63 61 6c 74 69 6d 65 28 |t tm *lo|caltime(|
|00001eb0| 29 3b 0a 09 73 74 72 75 | 63 74 20 74 6d 20 2a 6c |);..stru|ct tm *l|
|00001ec0| 6f 63 61 6c 63 6c 6f 63 | 6b 3b 0a 09 63 68 61 72 |ocalcloc|k;..char|
|00001ed0| 20 6c 69 6e 65 5f 62 75 | 66 5b 4e 5f 4c 49 4e 45 | line_bu|f[N_LINE|
|00001ee0| 53 5d 5b 4e 5f 43 48 41 | 52 53 5d 3b 0a 09 69 6e |S][N_CHA|RS];..in|
|00001ef0| 74 20 73 69 7a 65 73 5b | 4e 5f 4c 49 4e 45 53 5d |t sizes[|N_LINES]|
|00001f00| 3b 0a 09 63 68 61 72 20 | 62 69 67 5f 62 75 66 5b |;..char |big_buf[|
|00001f10| 4e 5f 4c 49 4e 45 53 2a | 4e 5f 43 48 41 52 53 5d |N_LINES*|N_CHARS]|
|00001f20| 3b 0a 09 63 68 61 72 20 | 2a 62 70 74 72 2c 20 2a |;..char |*bptr, *|
|00001f30| 6c 70 74 72 3b 0a 09 69 | 6e 74 20 69 2c 20 6a 2c |lptr;..i|nt i, j,|
|00001f40| 20 6d 61 78 5f 73 69 7a | 65 3b 0a 0a 09 69 20 3d | max_siz|e;...i =|
|00001f50| 20 30 3b 0a 09 6d 61 78 | 5f 73 69 7a 65 20 3d 20 | 0;..max|_size = |
|00001f60| 30 3b 0a 09 67 65 74 74 | 69 6d 65 6f 66 64 61 79 |0;..gett|imeofday|
|00001f70| 28 26 63 6c 6f 63 6b 2c | 20 26 7a 6f 6e 65 29 3b |(&clock,| &zone);|
|00001f80| 0a 09 6c 6f 63 61 6c 63 | 6c 6f 63 6b 20 3d 20 6c |..localc|lock = l|
|00001f90| 6f 63 61 6c 74 69 6d 65 | 28 20 26 63 6c 6f 63 6b |ocaltime|( &clock|
|00001fa0| 2e 74 76 5f 73 65 63 20 | 29 3b 0a 09 28 76 6f 69 |.tv_sec |);..(voi|
|00001fb0| 64 29 73 70 72 69 6e 74 | 66 28 6c 69 6e 65 5f 62 |d)sprint|f(line_b|
|00001fc0| 75 66 5b 69 5d 2c 20 22 | 20 22 29 3b 0a 09 73 69 |uf[i], "| ");..si|
|00001fd0| 7a 65 73 5b 69 5d 20 3d | 20 73 74 72 6c 65 6e 28 |zes[i] =| strlen(|
|00001fe0| 6c 69 6e 65 5f 62 75 66 | 5b 69 5d 29 3b 0a 09 6d |line_buf|[i]);..m|
|00001ff0| 61 78 5f 73 69 7a 65 20 | 3d 20 6d 61 78 28 6d 61 |ax_size |= max(ma|
|00002000| 78 5f 73 69 7a 65 2c 20 | 73 69 7a 65 73 5b 69 5d |x_size, |sizes[i]|
|00002010| 29 3b 0a 09 69 2b 2b 3b | 0a 09 28 76 6f 69 64 29 |);..i++;|..(void)|
|00002020| 73 70 72 69 6e 74 66 28 | 6c 69 6e 65 5f 62 75 66 |sprintf(|line_buf|
|00002030| 5b 69 5d 2c 20 22 4d 65 | 73 73 61 67 65 20 66 72 |[i], "Me|ssage fr|
|00002040| 6f 6d 20 54 61 6c 6b 5f | 44 61 65 6d 6f 6e 40 25 |om Talk_|Daemon@%|
|00002050| 73 20 61 74 20 25 64 3a | 25 30 32 64 20 2e 2e 2e |s at %d:|%02d ...|
|00002060| 22 2c 0a 09 68 6f 73 74 | 6e 61 6d 65 2c 20 6c 6f |",..host|name, lo|
|00002070| 63 61 6c 63 6c 6f 63 6b | 2d 3e 74 6d 5f 68 6f 75 |calclock|->tm_hou|
|00002080| 72 20 2c 20 6c 6f 63 61 | 6c 63 6c 6f 63 6b 2d 3e |r , loca|lclock->|
|00002090| 74 6d 5f 6d 69 6e 20 29 | 3b 0a 09 73 69 7a 65 73 |tm_min )|;..sizes|
|000020a0| 5b 69 5d 20 3d 20 73 74 | 72 6c 65 6e 28 6c 69 6e |[i] = st|rlen(lin|
|000020b0| 65 5f 62 75 66 5b 69 5d | 29 3b 0a 09 6d 61 78 5f |e_buf[i]|);..max_|
|000020c0| 73 69 7a 65 20 3d 20 6d | 61 78 28 6d 61 78 5f 73 |size = m|ax(max_s|
|000020d0| 69 7a 65 2c 20 73 69 7a | 65 73 5b 69 5d 29 3b 0a |ize, siz|es[i]);.|
|000020e0| 09 69 2b 2b 3b 0a 09 28 | 76 6f 69 64 29 73 70 72 |.i++;..(|void)spr|
|000020f0| 69 6e 74 66 28 6c 69 6e | 65 5f 62 75 66 5b 69 5d |intf(lin|e_buf[i]|
|00002100| 2c 20 22 74 61 6c 6b 3a | 20 63 6f 6e 6e 65 63 74 |, "talk:| connect|
|00002110| 69 6f 6e 20 72 65 71 75 | 65 73 74 65 64 20 62 79 |ion requ|ested by|
|00002120| 20 25 73 40 25 73 2e 22 | 2c 0a 09 09 72 65 71 75 | %s@%s."|,...requ|
|00002130| 65 73 74 2d 3e 6c 5f 6e | 61 6d 65 2c 20 72 65 6d |est->l_n|ame, rem|
|00002140| 6f 74 65 5f 6d 61 63 68 | 69 6e 65 29 3b 0a 09 73 |ote_mach|ine);..s|
|00002150| 69 7a 65 73 5b 69 5d 20 | 3d 20 73 74 72 6c 65 6e |izes[i] |= strlen|
|00002160| 28 6c 69 6e 65 5f 62 75 | 66 5b 69 5d 29 3b 0a 09 |(line_bu|f[i]);..|
|00002170| 6d 61 78 5f 73 69 7a 65 | 20 3d 20 6d 61 78 28 6d |max_size| = max(m|
|00002180| 61 78 5f 73 69 7a 65 2c | 20 73 69 7a 65 73 5b 69 |ax_size,| sizes[i|
|00002190| 5d 29 3b 0a 09 69 2b 2b | 3b 0a 09 28 76 6f 69 64 |]);..i++|;..(void|
|000021a0| 29 73 70 72 69 6e 74 66 | 28 6c 69 6e 65 5f 62 75 |)sprintf|(line_bu|
|000021b0| 66 5b 69 5d 2c 20 22 74 | 61 6c 6b 3a 20 72 65 73 |f[i], "t|alk: res|
|000021c0| 70 6f 6e 64 20 77 69 74 | 68 3a 20 20 74 61 6c 6b |pond wit|h: talk|
|000021d0| 20 25 73 40 25 73 22 2c | 0a 09 09 72 65 71 75 65 | %s@%s",|...reque|
|000021e0| 73 74 2d 3e 6c 5f 6e 61 | 6d 65 2c 20 72 65 6d 6f |st->l_na|me, remo|
|000021f0| 74 65 5f 6d 61 63 68 69 | 6e 65 29 3b 0a 09 73 69 |te_machi|ne);..si|
|00002200| 7a 65 73 5b 69 5d 20 3d | 20 73 74 72 6c 65 6e 28 |zes[i] =| strlen(|
|00002210| 6c 69 6e 65 5f 62 75 66 | 5b 69 5d 29 3b 0a 09 6d |line_buf|[i]);..m|
|00002220| 61 78 5f 73 69 7a 65 20 | 3d 20 6d 61 78 28 6d 61 |ax_size |= max(ma|
|00002230| 78 5f 73 69 7a 65 2c 20 | 73 69 7a 65 73 5b 69 5d |x_size, |sizes[i]|
|00002240| 29 3b 0a 09 69 2b 2b 3b | 0a 09 28 76 6f 69 64 29 |);..i++;|..(void)|
|00002250| 73 70 72 69 6e 74 66 28 | 6c 69 6e 65 5f 62 75 66 |sprintf(|line_buf|
|00002260| 5b 69 5d 2c 20 22 20 22 | 29 3b 0a 09 73 69 7a 65 |[i], " "|);..size|
|00002270| 73 5b 69 5d 20 3d 20 73 | 74 72 6c 65 6e 28 6c 69 |s[i] = s|trlen(li|
|00002280| 6e 65 5f 62 75 66 5b 69 | 5d 29 3b 0a 09 6d 61 78 |ne_buf[i|]);..max|
|00002290| 5f 73 69 7a 65 20 3d 20 | 6d 61 78 28 6d 61 78 5f |_size = |max(max_|
|000022a0| 73 69 7a 65 2c 20 73 69 | 7a 65 73 5b 69 5d 29 3b |size, si|zes[i]);|
|000022b0| 0a 09 69 2b 2b 3b 0a 09 | 62 70 74 72 20 3d 20 62 |..i++;..|bptr = b|
|000022c0| 69 67 5f 62 75 66 3b 0a | 09 2a 62 70 74 72 2b 2b |ig_buf;.|.*bptr++|
|000022d0| 20 3d 20 27 07 27 3b 20 | 2f 2a 20 73 65 6e 64 20 | = '.'; |/* send |
|000022e0| 73 6f 6d 65 74 68 69 6e | 67 20 74 6f 20 77 61 6b |somethin|g to wak|
|000022f0| 65 20 74 68 65 6d 20 75 | 70 20 2a 2f 0a 09 2a 62 |e them u|p */..*b|
|00002300| 70 74 72 2b 2b 20 3d 20 | 27 5c 72 27 3b 09 2f 2a |ptr++ = |'\r';./*|
|00002310| 20 61 64 64 20 61 20 5c | 72 20 69 6e 20 63 61 73 | add a \|r in cas|
|00002320| 65 20 6f 66 20 72 61 77 | 20 6d 6f 64 65 20 2a 2f |e of raw| mode */|
|00002330| 0a 09 2a 62 70 74 72 2b | 2b 20 3d 20 27 5c 6e 27 |..*bptr+|+ = '\n'|
|00002340| 3b 0a 09 66 6f 72 20 28 | 69 20 3d 20 30 3b 20 69 |;..for (|i = 0; i|
|00002350| 20 3c 20 4e 5f 4c 49 4e | 45 53 3b 20 69 2b 2b 29 | < N_LIN|ES; i++)|
|00002360| 20 7b 0a 09 09 2f 2a 20 | 63 6f 70 79 20 74 68 65 | {.../* |copy the|
|00002370| 20 6c 69 6e 65 20 69 6e | 74 6f 20 74 68 65 20 62 | line in|to the b|
|00002380| 69 67 20 62 75 66 66 65 | 72 20 2a 2f 0a 09 09 6c |ig buffe|r */...l|
|00002390| 70 74 72 20 3d 20 6c 69 | 6e 65 5f 62 75 66 5b 69 |ptr = li|ne_buf[i|
|000023a0| 5d 3b 0a 09 09 77 68 69 | 6c 65 20 28 2a 6c 70 74 |];...whi|le (*lpt|
|000023b0| 72 20 21 3d 20 27 5c 30 | 27 29 0a 09 09 09 2a 28 |r != '\0|')....*(|
|000023c0| 62 70 74 72 2b 2b 29 20 | 3d 20 2a 28 6c 70 74 72 |bptr++) |= *(lptr|
|000023d0| 2b 2b 29 3b 0a 09 09 2f | 2a 20 70 61 64 20 6f 75 |++);.../|* pad ou|
|000023e0| 74 20 74 68 65 20 72 65 | 73 74 20 6f 66 20 74 68 |t the re|st of th|
|000023f0| 65 20 6c 69 6e 65 73 20 | 77 69 74 68 20 62 6c 61 |e lines |with bla|
|00002400| 6e 6b 73 20 2a 2f 0a 09 | 09 66 6f 72 20 28 6a 20 |nks */..|.for (j |
|00002410| 3d 20 73 69 7a 65 73 5b | 69 5d 3b 20 6a 20 3c 20 |= sizes[|i]; j < |
|00002420| 6d 61 78 5f 73 69 7a 65 | 20 2b 20 32 3b 20 6a 2b |max_size| + 2; j+|
|00002430| 2b 29 0a 09 09 09 2a 28 | 62 70 74 72 2b 2b 29 20 |+)....*(|bptr++) |
|00002440| 3d 20 27 20 27 3b 0a 09 | 09 2a 28 62 70 74 72 2b |= ' ';..|.*(bptr+|
|00002450| 2b 29 20 3d 20 27 5c 72 | 27 3b 09 2f 2a 20 61 64 |+) = '\r|';./* ad|
|00002460| 64 20 61 20 5c 72 20 69 | 6e 20 63 61 73 65 20 6f |d a \r i|n case o|
|00002470| 66 20 72 61 77 20 6d 6f | 64 65 20 2a 2f 0a 09 09 |f raw mo|de */...|
|00002480| 2a 28 62 70 74 72 2b 2b | 29 20 3d 20 27 5c 6e 27 |*(bptr++|) = '\n'|
|00002490| 3b 0a 09 7d 0a 09 2a 62 | 70 74 72 20 3d 20 27 5c |;..}..*b|ptr = '\|
|000024a0| 30 27 3b 0a 09 66 70 72 | 69 6e 74 66 28 74 66 2c |0';..fpr|intf(tf,|
|000024b0| 20 62 69 67 5f 62 75 66 | 29 3b 0a 09 66 66 6c 75 | big_buf|);..fflu|
|000024c0| 73 68 28 74 66 29 3b 0a | 09 69 6f 63 74 6c 28 66 |sh(tf);.|.ioctl(f|
|000024d0| 69 6c 65 6e 6f 28 74 66 | 29 2c 20 54 49 4f 43 4e |ileno(tf|), TIOCN|
|000024e0| 4f 54 54 59 2c 20 28 73 | 74 72 75 63 74 20 73 67 |OTTY, (s|truct sg|
|000024f0| 74 74 79 62 20 2a 29 20 | 30 29 3b 0a 7d 0a 00 00 |ttyb *) |0);.}...|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 69 6e 2e 74 61 6c 6b 64 | 2e 38 00 00 00 00 00 00 |in.talkd|.8......|
|00002610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00002670| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00002680| 20 20 20 35 37 37 35 20 | 20 35 30 30 31 34 32 32 | 5775 | 5001422|
|00002690| 35 34 33 20 20 31 30 37 | 33 33 00 20 30 00 00 00 |543 107|33. 0...|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 2e 5c 22 20 43 6f 70 79 | 72 69 67 68 74 20 28 63 |.\" Copy|right (c|
|00002810| 29 20 31 39 38 33 2c 20 | 31 39 39 31 20 54 68 65 |) 1983, |1991 The|
|00002820| 20 52 65 67 65 6e 74 73 | 20 6f 66 20 74 68 65 20 | Regents| of the |
|00002830| 55 6e 69 76 65 72 73 69 | 74 79 20 6f 66 20 43 61 |Universi|ty of Ca|
|00002840| 6c 69 66 6f 72 6e 69 61 | 2e 0a 2e 5c 22 20 41 6c |lifornia|...\" Al|
|00002850| 6c 20 72 69 67 68 74 73 | 20 72 65 73 65 72 76 65 |l rights| reserve|
|00002860| 64 2e 0a 2e 5c 22 0a 2e | 5c 22 20 52 65 64 69 73 |d...\"..|\" Redis|
|00002870| 74 72 69 62 75 74 69 6f | 6e 20 61 6e 64 20 75 73 |tributio|n and us|
|00002880| 65 20 69 6e 20 73 6f 75 | 72 63 65 20 61 6e 64 20 |e in sou|rce and |
|00002890| 62 69 6e 61 72 79 20 66 | 6f 72 6d 73 2c 20 77 69 |binary f|orms, wi|
|000028a0| 74 68 20 6f 72 20 77 69 | 74 68 6f 75 74 0a 2e 5c |th or wi|thout..\|
|000028b0| 22 20 6d 6f 64 69 66 69 | 63 61 74 69 6f 6e 2c 20 |" modifi|cation, |
|000028c0| 61 72 65 20 70 65 72 6d | 69 74 74 65 64 20 70 72 |are perm|itted pr|
|000028d0| 6f 76 69 64 65 64 20 74 | 68 61 74 20 74 68 65 20 |ovided t|hat the |
|000028e0| 66 6f 6c 6c 6f 77 69 6e | 67 20 63 6f 6e 64 69 74 |followin|g condit|
|000028f0| 69 6f 6e 73 0a 2e 5c 22 | 20 61 72 65 20 6d 65 74 |ions..\"| are met|
|00002900| 3a 0a 2e 5c 22 20 31 2e | 20 52 65 64 69 73 74 72 |:..\" 1.| Redistr|
|00002910| 69 62 75 74 69 6f 6e 73 | 20 6f 66 20 73 6f 75 72 |ibutions| of sour|
|00002920| 63 65 20 63 6f 64 65 20 | 6d 75 73 74 20 72 65 74 |ce code |must ret|
|00002930| 61 69 6e 20 74 68 65 20 | 61 62 6f 76 65 20 63 6f |ain the |above co|
|00002940| 70 79 72 69 67 68 74 0a | 2e 5c 22 20 20 20 20 6e |pyright.|.\" n|
|00002950| 6f 74 69 63 65 2c 20 74 | 68 69 73 20 6c 69 73 74 |otice, t|his list|
|00002960| 20 6f 66 20 63 6f 6e 64 | 69 74 69 6f 6e 73 20 61 | of cond|itions a|
|00002970| 6e 64 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |nd the f|ollowing|
|00002980| 20 64 69 73 63 6c 61 69 | 6d 65 72 2e 0a 2e 5c 22 | disclai|mer...\"|
|00002990| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|000029a0| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|000029b0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|000029c0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000029d0| 72 69 67 68 74 0a 2e 5c | 22 20 20 20 20 6e 6f 74 |right..\|" not|
|000029e0| 69 63 65 2c 20 74 68 69 | 73 20 6c 69 73 74 20 6f |ice, thi|s list o|
|000029f0| 66 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 61 6e 64 |f condit|ions and|
|00002a00| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 64 | the fol|lowing d|
|00002a10| 69 73 63 6c 61 69 6d 65 | 72 20 69 6e 20 74 68 65 |isclaime|r in the|
|00002a20| 0a 2e 5c 22 20 20 20 20 | 64 6f 63 75 6d 65 6e 74 |..\" |document|
|00002a30| 61 74 69 6f 6e 20 61 6e | 64 2f 6f 72 20 6f 74 68 |ation an|d/or oth|
|00002a40| 65 72 20 6d 61 74 65 72 | 69 61 6c 73 20 70 72 6f |er mater|ials pro|
|00002a50| 76 69 64 65 64 20 77 69 | 74 68 20 74 68 65 20 64 |vided wi|th the d|
|00002a60| 69 73 74 72 69 62 75 74 | 69 6f 6e 2e 0a 2e 5c 22 |istribut|ion...\"|
|00002a70| 20 33 2e 20 41 6c 6c 20 | 61 64 76 65 72 74 69 73 | 3. All |advertis|
|00002a80| 69 6e 67 20 6d 61 74 65 | 72 69 61 6c 73 20 6d 65 |ing mate|rials me|
|00002a90| 6e 74 69 6f 6e 69 6e 67 | 20 66 65 61 74 75 72 65 |ntioning| feature|
|00002aa0| 73 20 6f 72 20 75 73 65 | 20 6f 66 20 74 68 69 73 |s or use| of this|
|00002ab0| 20 73 6f 66 74 77 61 72 | 65 0a 2e 5c 22 20 20 20 | softwar|e..\" |
|00002ac0| 20 6d 75 73 74 20 64 69 | 73 70 6c 61 79 20 74 68 | must di|splay th|
|00002ad0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 61 63 6b 6e |e follow|ing ackn|
|00002ae0| 6f 77 6c 65 64 67 65 6d | 65 6e 74 3a 0a 2e 5c 22 |owledgem|ent:..\"|
|00002af0| 09 54 68 69 73 20 70 72 | 6f 64 75 63 74 20 69 6e |.This pr|oduct in|
|00002b00| 63 6c 75 64 65 73 20 73 | 6f 66 74 77 61 72 65 20 |cludes s|oftware |
|00002b10| 64 65 76 65 6c 6f 70 65 | 64 20 62 79 20 74 68 65 |develope|d by the|
|00002b20| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 0a 2e | Univers|ity of..|
|00002b30| 5c 22 09 43 61 6c 69 66 | 6f 72 6e 69 61 2c 20 42 |\".Calif|ornia, B|
|00002b40| 65 72 6b 65 6c 65 79 20 | 61 6e 64 20 69 74 73 20 |erkeley |and its |
|00002b50| 63 6f 6e 74 72 69 62 75 | 74 6f 72 73 2e 0a 2e 5c |contribu|tors...\|
|00002b60| 22 20 34 2e 20 4e 65 69 | 74 68 65 72 20 74 68 65 |" 4. Nei|ther the|
|00002b70| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 55 6e 69 | name of| the Uni|
|00002b80| 76 65 72 73 69 74 79 20 | 6e 6f 72 20 74 68 65 20 |versity |nor the |
|00002b90| 6e 61 6d 65 73 20 6f 66 | 20 69 74 73 20 63 6f 6e |names of| its con|
|00002ba0| 74 72 69 62 75 74 6f 72 | 73 0a 2e 5c 22 20 20 20 |tributor|s..\" |
|00002bb0| 20 6d 61 79 20 62 65 20 | 75 73 65 64 20 74 6f 20 | may be |used to |
|00002bc0| 65 6e 64 6f 72 73 65 20 | 6f 72 20 70 72 6f 6d 6f |endorse |or promo|
|00002bd0| 74 65 20 70 72 6f 64 75 | 63 74 73 20 64 65 72 69 |te produ|cts deri|
|00002be0| 76 65 64 20 66 72 6f 6d | 20 74 68 69 73 20 73 6f |ved from| this so|
|00002bf0| 66 74 77 61 72 65 0a 2e | 5c 22 20 20 20 20 77 69 |ftware..|\" wi|
|00002c00| 74 68 6f 75 74 20 73 70 | 65 63 69 66 69 63 20 70 |thout sp|ecific p|
|00002c10| 72 69 6f 72 20 77 72 69 | 74 74 65 6e 20 70 65 72 |rior wri|tten per|
|00002c20| 6d 69 73 73 69 6f 6e 2e | 0a 2e 5c 22 0a 2e 5c 22 |mission.|..\"..\"|
|00002c30| 20 54 48 49 53 20 53 4f | 46 54 57 41 52 45 20 49 | THIS SO|FTWARE I|
|00002c40| 53 20 50 52 4f 56 49 44 | 45 44 20 42 59 20 54 48 |S PROVID|ED BY TH|
|00002c50| 45 20 52 45 47 45 4e 54 | 53 20 41 4e 44 20 43 4f |E REGENT|S AND CO|
|00002c60| 4e 54 52 49 42 55 54 4f | 52 53 20 60 60 41 53 20 |NTRIBUTO|RS ``AS |
|00002c70| 49 53 27 27 20 41 4e 44 | 0a 2e 5c 22 20 41 4e 59 |IS'' AND|..\" ANY|
|00002c80| 20 45 58 50 52 45 53 53 | 20 4f 52 20 49 4d 50 4c | EXPRESS| OR IMPL|
|00002c90| 49 45 44 20 57 41 52 52 | 41 4e 54 49 45 53 2c 20 |IED WARR|ANTIES, |
|00002ca0| 49 4e 43 4c 55 44 49 4e | 47 2c 20 42 55 54 20 4e |INCLUDIN|G, BUT N|
|00002cb0| 4f 54 20 4c 49 4d 49 54 | 45 44 20 54 4f 2c 20 54 |OT LIMIT|ED TO, T|
|00002cc0| 48 45 0a 2e 5c 22 20 49 | 4d 50 4c 49 45 44 20 57 |HE..\" I|MPLIED W|
|00002cd0| 41 52 52 41 4e 54 49 45 | 53 20 4f 46 20 4d 45 52 |ARRANTIE|S OF MER|
|00002ce0| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 41 4e 44 |CHANTABI|LITY AND|
|00002cf0| 20 46 49 54 4e 45 53 53 | 20 46 4f 52 20 41 20 50 | FITNESS| FOR A P|
|00002d00| 41 52 54 49 43 55 4c 41 | 52 20 50 55 52 50 4f 53 |ARTICULA|R PURPOS|
|00002d10| 45 0a 2e 5c 22 20 41 52 | 45 20 44 49 53 43 4c 41 |E..\" AR|E DISCLA|
|00002d20| 49 4d 45 44 2e 20 20 49 | 4e 20 4e 4f 20 45 56 45 |IMED. I|N NO EVE|
|00002d30| 4e 54 20 53 48 41 4c 4c | 20 54 48 45 20 52 45 47 |NT SHALL| THE REG|
|00002d40| 45 4e 54 53 20 4f 52 20 | 43 4f 4e 54 52 49 42 55 |ENTS OR |CONTRIBU|
|00002d50| 54 4f 52 53 20 42 45 20 | 4c 49 41 42 4c 45 0a 2e |TORS BE |LIABLE..|
|00002d60| 5c 22 20 46 4f 52 20 41 | 4e 59 20 44 49 52 45 43 |\" FOR A|NY DIREC|
|00002d70| 54 2c 20 49 4e 44 49 52 | 45 43 54 2c 20 49 4e 43 |T, INDIR|ECT, INC|
|00002d80| 49 44 45 4e 54 41 4c 2c | 20 53 50 45 43 49 41 4c |IDENTAL,| SPECIAL|
|00002d90| 2c 20 45 58 45 4d 50 4c | 41 52 59 2c 20 4f 52 20 |, EXEMPL|ARY, OR |
|00002da0| 43 4f 4e 53 45 51 55 45 | 4e 54 49 41 4c 0a 2e 5c |CONSEQUE|NTIAL..\|
|00002db0| 22 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |" DAMAGE|S (INCLU|
|00002dc0| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|00002dd0| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|00002de0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|00002df0| 55 54 45 20 47 4f 4f 44 | 53 0a 2e 5c 22 20 4f 52 |UTE GOOD|S..\" OR|
|00002e00| 20 53 45 52 56 49 43 45 | 53 3b 20 4c 4f 53 53 20 | SERVICE|S; LOSS |
|00002e10| 4f 46 20 55 53 45 2c 20 | 44 41 54 41 2c 20 4f 52 |OF USE, |DATA, OR|
|00002e20| 20 50 52 4f 46 49 54 53 | 3b 20 4f 52 20 42 55 53 | PROFITS|; OR BUS|
|00002e30| 49 4e 45 53 53 20 49 4e | 54 45 52 52 55 50 54 49 |INESS IN|TERRUPTI|
|00002e40| 4f 4e 29 0a 2e 5c 22 20 | 48 4f 57 45 56 45 52 20 |ON)..\" |HOWEVER |
|00002e50| 43 41 55 53 45 44 20 41 | 4e 44 20 4f 4e 20 41 4e |CAUSED A|ND ON AN|
|00002e60| 59 20 54 48 45 4f 52 59 | 20 4f 46 20 4c 49 41 42 |Y THEORY| OF LIAB|
|00002e70| 49 4c 49 54 59 2c 20 57 | 48 45 54 48 45 52 20 49 |ILITY, W|HETHER I|
|00002e80| 4e 20 43 4f 4e 54 52 41 | 43 54 2c 20 53 54 52 49 |N CONTRA|CT, STRI|
|00002e90| 43 54 0a 2e 5c 22 20 4c | 49 41 42 49 4c 49 54 59 |CT..\" L|IABILITY|
|00002ea0| 2c 20 4f 52 20 54 4f 52 | 54 20 28 49 4e 43 4c 55 |, OR TOR|T (INCLU|
|00002eb0| 44 49 4e 47 20 4e 45 47 | 4c 49 47 45 4e 43 45 20 |DING NEG|LIGENCE |
|00002ec0| 4f 52 20 4f 54 48 45 52 | 57 49 53 45 29 20 41 52 |OR OTHER|WISE) AR|
|00002ed0| 49 53 49 4e 47 20 49 4e | 20 41 4e 59 20 57 41 59 |ISING IN| ANY WAY|
|00002ee0| 0a 2e 5c 22 20 4f 55 54 | 20 4f 46 20 54 48 45 20 |..\" OUT| OF THE |
|00002ef0| 55 53 45 20 4f 46 20 54 | 48 49 53 20 53 4f 46 54 |USE OF T|HIS SOFT|
|00002f00| 57 41 52 45 2c 20 45 56 | 45 4e 20 49 46 20 41 44 |WARE, EV|EN IF AD|
|00002f10| 56 49 53 45 44 20 4f 46 | 20 54 48 45 20 50 4f 53 |VISED OF| THE POS|
|00002f20| 53 49 42 49 4c 49 54 59 | 20 4f 46 0a 2e 5c 22 20 |SIBILITY| OF..\" |
|00002f30| 53 55 43 48 20 44 41 4d | 41 47 45 2e 0a 2e 5c 22 |SUCH DAM|AGE...\"|
|00002f40| 0a 2e 5c 22 20 20 20 20 | 20 40 28 23 29 74 61 6c |..\" | @(#)tal|
|00002f50| 6b 64 2e 38 09 36 2e 35 | 20 28 42 65 72 6b 65 6c |kd.8.6.5| (Berkel|
|00002f60| 65 79 29 20 33 2f 31 36 | 2f 39 31 0a 2e 5c 22 0a |ey) 3/16|/91..\".|
|00002f70| 2e 44 64 20 4d 61 72 63 | 68 20 31 36 2c 20 31 39 |.Dd Marc|h 16, 19|
|00002f80| 39 31 0a 2e 44 74 20 54 | 41 4c 4b 44 20 38 0a 2e |91..Dt T|ALKD 8..|
|00002f90| 4f 73 20 42 53 44 20 34 | 2e 33 0a 2e 53 68 20 4e |Os BSD 4|.3..Sh N|
|00002fa0| 41 4d 45 0a 2e 4e 6d 20 | 74 61 6c 6b 64 0a 2e 4e |AME..Nm |talkd..N|
|00002fb0| 64 20 72 65 6d 6f 74 65 | 20 75 73 65 72 20 63 6f |d remote| user co|
|00002fc0| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 73 65 72 76 |mmunicat|ion serv|
|00002fd0| 65 72 0a 2e 53 68 20 53 | 59 4e 4f 50 53 49 53 0a |er..Sh S|YNOPSIS.|
|00002fe0| 2e 4e 6d 20 74 61 6c 6b | 64 0a 2e 53 68 20 44 45 |.Nm talk|d..Sh DE|
|00002ff0| 53 43 52 49 50 54 49 4f | 4e 0a 2e 4e 6d 20 54 61 |SCRIPTIO|N..Nm Ta|
|00003000| 6c 6b 64 0a 69 73 20 74 | 68 65 20 73 65 72 76 65 |lkd.is t|he serve|
|00003010| 72 20 74 68 61 74 20 6e | 6f 74 69 66 69 65 73 20 |r that n|otifies |
|00003020| 61 20 75 73 65 72 20 74 | 68 61 74 20 73 6f 6d 65 |a user t|hat some|
|00003030| 6f 6e 65 20 65 6c 73 65 | 20 77 61 6e 74 73 20 74 |one else| wants t|
|00003040| 6f 0a 69 6e 69 74 69 61 | 74 65 20 61 20 63 6f 6e |o.initia|te a con|
|00003050| 76 65 72 73 61 74 69 6f | 6e 2e 0a 49 74 20 61 63 |versatio|n..It ac|
|00003060| 74 73 20 61 20 72 65 70 | 6f 73 69 74 6f 72 79 20 |ts a rep|ository |
|00003070| 6f 66 20 69 6e 76 69 74 | 61 74 69 6f 6e 73 2c 20 |of invit|ations, |
|00003080| 72 65 73 70 6f 6e 64 69 | 6e 67 20 74 6f 20 72 65 |respondi|ng to re|
|00003090| 71 75 65 73 74 73 0a 62 | 79 20 63 6c 69 65 6e 74 |quests.b|y client|
|000030a0| 73 20 77 69 73 68 69 6e | 67 20 74 6f 20 72 65 6e |s wishin|g to ren|
|000030b0| 64 65 7a 76 6f 75 73 20 | 74 6f 20 68 6f 6c 64 20 |dezvous |to hold |
|000030c0| 61 20 63 6f 6e 76 65 72 | 73 61 74 69 6f 6e 2e 0a |a conver|sation..|
|000030d0| 49 6e 20 6e 6f 72 6d 61 | 6c 20 6f 70 65 72 61 74 |In norma|l operat|
|000030e0| 69 6f 6e 2c 20 61 20 63 | 6c 69 65 6e 74 2c 20 74 |ion, a c|lient, t|
|000030f0| 68 65 20 63 61 6c 6c 65 | 72 2c 0a 69 6e 69 74 69 |he calle|r,.initi|
|00003100| 61 74 65 73 20 61 20 72 | 65 6e 64 65 7a 76 6f 75 |ates a r|endezvou|
|00003110| 73 20 62 79 20 73 65 6e | 64 69 6e 67 20 61 0a 2e |s by sen|ding a..|
|00003120| 54 6e 20 43 54 4c 5f 4d | 53 47 0a 74 6f 20 74 68 |Tn CTL_M|SG.to th|
|00003130| 65 20 73 65 72 76 65 72 | 20 6f 66 0a 74 79 70 65 |e server| of.type|
|00003140| 0a 2e 54 6e 20 4c 4f 4f | 4b 5f 55 50 0a 28 73 65 |..Tn LOO|K_UP.(se|
|00003150| 65 0a 2e 41 71 20 50 61 | 20 70 72 6f 74 6f 63 6f |e..Aq Pa| protoco|
|00003160| 6c 73 2f 74 61 6c 6b 64 | 2e 68 20 29 20 2e 0a 54 |ls/talkd|.h ) ..T|
|00003170| 68 69 73 20 63 61 75 73 | 65 73 20 74 68 65 20 73 |his caus|es the s|
|00003180| 65 72 76 65 72 20 74 6f | 20 73 65 61 72 63 68 20 |erver to| search |
|00003190| 69 74 73 20 69 6e 76 69 | 74 61 74 69 6f 6e 0a 74 |its invi|tation.t|
|000031a0| 61 62 6c 65 73 20 74 6f | 20 63 68 65 63 6b 20 69 |ables to| check i|
|000031b0| 66 20 61 6e 20 69 6e 76 | 69 74 61 74 69 6f 6e 20 |f an inv|itation |
|000031c0| 63 75 72 72 65 6e 74 6c | 79 20 65 78 69 73 74 73 |currentl|y exists|
|000031d0| 20 66 6f 72 20 74 68 65 | 20 63 61 6c 6c 65 72 0a | for the| caller.|
|000031e0| 28 74 6f 20 73 70 65 61 | 6b 20 74 6f 20 74 68 65 |(to spea|k to the|
|000031f0| 20 63 61 6c 6c 65 65 20 | 73 70 65 63 69 66 69 65 | callee |specifie|
|00003200| 64 20 69 6e 20 74 68 65 | 20 6d 65 73 73 61 67 65 |d in the| message|
|00003210| 29 2e 0a 49 66 20 74 68 | 65 20 6c 6f 6f 6b 75 70 |)..If th|e lookup|
|00003220| 20 66 61 69 6c 73 2c 0a | 74 68 65 20 63 61 6c 6c | fails,.|the call|
|00003230| 65 72 20 74 68 65 6e 20 | 73 65 6e 64 73 20 61 6e |er then |sends an|
|00003240| 0a 2e 54 6e 20 41 4e 4e | 4f 55 4e 43 45 0a 6d 65 |..Tn ANN|OUNCE.me|
|00003250| 73 73 61 67 65 20 63 61 | 75 73 69 6e 67 20 74 68 |ssage ca|using th|
|00003260| 65 20 73 65 72 76 65 72 | 20 74 6f 0a 62 72 6f 61 |e server| to.broa|
|00003270| 64 63 61 73 74 20 61 6e | 20 61 6e 6e 6f 75 6e 63 |dcast an| announc|
|00003280| 65 6d 65 6e 74 20 6f 6e | 20 74 68 65 20 63 61 6c |ement on| the cal|
|00003290| 6c 65 65 27 73 20 6c 6f | 67 69 6e 20 70 6f 72 74 |lee's lo|gin port|
|000032a0| 73 20 72 65 71 75 65 73 | 74 69 6e 67 20 63 6f 6e |s reques|ting con|
|000032b0| 74 61 63 74 2e 0a 57 68 | 65 6e 20 74 68 65 20 63 |tact..Wh|en the c|
|000032c0| 61 6c 6c 65 65 20 72 65 | 73 70 6f 6e 64 73 2c 20 |allee re|sponds, |
|000032d0| 74 68 65 20 6c 6f 63 61 | 6c 20 73 65 72 76 65 72 |the loca|l server|
|000032e0| 20 75 73 65 73 20 74 68 | 65 0a 72 65 63 6f 72 64 | uses th|e.record|
|000032f0| 65 64 20 69 6e 76 69 74 | 61 74 69 6f 6e 20 74 6f |ed invit|ation to|
|00003300| 20 72 65 73 70 6f 6e 64 | 20 77 69 74 68 20 74 68 | respond| with th|
|00003310| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 72 65 |e approp|riate re|
|00003320| 6e 64 65 7a 76 6f 75 73 | 0a 61 64 64 72 65 73 73 |ndezvous|.address|
|00003330| 20 61 6e 64 20 74 68 65 | 20 63 61 6c 6c 65 72 20 | and the| caller |
|00003340| 61 6e 64 20 63 61 6c 6c | 65 65 20 63 6c 69 65 6e |and call|ee clien|
|00003350| 74 20 70 72 6f 67 72 61 | 6d 73 20 65 73 74 61 62 |t progra|ms estab|
|00003360| 6c 69 73 68 20 61 0a 73 | 74 72 65 61 6d 20 63 6f |lish a.s|tream co|
|00003370| 6e 6e 65 63 74 69 6f 6e | 20 74 68 72 6f 75 67 68 |nnection| through|
|00003380| 20 77 68 69 63 68 20 74 | 68 65 20 63 6f 6e 76 65 | which t|he conve|
|00003390| 72 73 61 74 69 6f 6e 20 | 74 61 6b 65 73 20 70 6c |rsation |takes pl|
|000033a0| 61 63 65 2e 0a 2e 53 68 | 20 53 45 45 20 41 4c 53 |ace...Sh| SEE ALS|
|000033b0| 4f 0a 2e 58 72 20 74 61 | 6c 6b 20 31 20 2c 0a 2e |O..Xr ta|lk 1 ,..|
|000033c0| 58 72 20 77 72 69 74 65 | 20 31 0a 2e 53 68 20 48 |Xr write| 1..Sh H|
|000033d0| 49 53 54 4f 52 59 0a 54 | 68 65 0a 2e 4e 6d 0a 63 |ISTORY.T|he..Nm.c|
|000033e0| 6f 6d 6d 61 6e 64 20 61 | 70 70 65 61 72 65 64 20 |ommand a|ppeared |
|000033f0| 69 6e 0a 2e 42 78 20 34 | 2e 33 20 2e 0a 00 00 00 |in..Bx 4|.3 .....|
|00003400| 70 72 69 6e 74 2e 63 00 | 00 00 00 00 00 00 00 00 |print.c.|........|
|00003410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00003470| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00003480| 20 20 20 36 31 34 32 20 | 20 35 30 30 31 34 32 32 | 6142 | 5001422|
|00003490| 35 34 33 20 20 31 30 34 | 32 33 00 20 30 00 00 00 |543 104|23. 0...|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00003610| 28 63 29 20 31 39 38 33 | 20 52 65 67 65 6e 74 73 |(c) 1983| Regents|
|00003620| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00003630| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00003640| 2e 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.. * All| rights |
|00003650| 72 65 73 65 72 76 65 64 | 2e 0a 20 2a 0a 20 2a 20 |reserved|.. *. * |
|00003660| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00003670| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00003680| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00003690| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|000036a0| 75 74 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|000036b0| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|000036c0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|000036d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000036e0| 6e 64 69 74 69 6f 6e 73 | 0a 20 2a 20 61 72 65 20 |nditions|. * are |
|000036f0| 6d 65 74 3a 0a 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|00003700| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|00003710| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00003720| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00003730| 63 6f 70 79 72 69 67 68 | 74 0a 20 2a 20 20 20 20 |copyrigh|t. * |
|00003740| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00003750| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00003760| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00003770| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 20 2a |g discla|imer.. *|
|00003780| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00003790| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|000037a0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|000037b0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000037c0| 72 69 67 68 74 0a 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|000037d0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|000037e0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|000037f0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|00003800| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0a |sclaimer| in the.|
|00003810| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00003820| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00003830| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00003840| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00003850| 74 72 69 62 75 74 69 6f | 6e 2e 0a 20 2a 20 33 2e |tributio|n.. * 3.|
|00003860| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00003870| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00003880| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00003890| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|000038a0| 66 74 77 61 72 65 0a 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|000038b0| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|000038c0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|000038d0| 64 67 65 6d 65 6e 74 3a | 0a 20 2a 09 54 68 69 73 |dgement:|. *.This|
|000038e0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|000038f0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|00003900| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|00003910| 65 72 73 69 74 79 20 6f | 66 0a 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00003920| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00003930| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00003940| 62 75 74 6f 72 73 2e 0a | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00003950| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00003960| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00003970| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00003980| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00003990| 72 73 0a 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|000039a0| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|000039b0| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|000039c0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000039d0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0a 20 | this so|ftware. |
|000039e0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|000039f0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|00003a00| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0a |ten perm|ission..|
|00003a10| 20 2a 0a 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 | *. * TH|IS SOFTW|
|00003a20| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00003a30| 42 59 20 54 48 45 20 52 | 45 47 45 4e 54 53 20 41 |BY THE R|EGENTS A|
|00003a40| 4e 44 20 43 4f 4e 54 52 | 49 42 55 54 4f 52 53 20 |ND CONTR|IBUTORS |
|00003a50| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 0a 20 2a |``AS IS'|' AND. *|
|00003a60| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 20 | ANY EXP|RESS OR |
|00003a70| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00003a80| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B|
|00003a90| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|00003aa0| 4f 2c 20 54 48 45 0a 20 | 2a 20 49 4d 50 4c 49 45 |O, THE. |* IMPLIE|
|00003ab0| 44 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |D WARRAN|TIES OF |
|00003ac0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|00003ad0| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|00003ae0| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00003af0| 50 4f 53 45 0a 20 2a 20 | 41 52 45 20 44 49 53 43 |POSE. * |ARE DISC|
|00003b00| 4c 41 49 4d 45 44 2e 20 | 20 49 4e 20 4e 4f 20 45 |LAIMED. | IN NO E|
|00003b10| 56 45 4e 54 20 53 48 41 | 4c 4c 20 54 48 45 20 52 |VENT SHA|LL THE R|
|00003b20| 45 47 45 4e 54 53 20 4f | 52 20 43 4f 4e 54 52 49 |EGENTS O|R CONTRI|
|00003b30| 42 55 54 4f 52 53 20 42 | 45 20 4c 49 41 42 4c 45 |BUTORS B|E LIABLE|
|00003b40| 0a 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |. * FOR |ANY DIRE|
|00003b50| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00003b60| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00003b70| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00003b80| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0a 20 | CONSEQU|ENTIAL. |
|00003b90| 2a 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |* DAMAGE|S (INCLU|
|00003ba0| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|00003bb0| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|00003bc0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|00003bd0| 55 54 45 20 47 4f 4f 44 | 53 0a 20 2a 20 4f 52 20 |UTE GOOD|S. * OR |
|00003be0| 53 45 52 56 49 43 45 53 | 3b 20 4c 4f 53 53 20 4f |SERVICES|; LOSS O|
|00003bf0| 46 20 55 53 45 2c 20 44 | 41 54 41 2c 20 4f 52 20 |F USE, D|ATA, OR |
|00003c00| 50 52 4f 46 49 54 53 3b | 20 4f 52 20 42 55 53 49 |PROFITS;| OR BUSI|
|00003c10| 4e 45 53 53 20 49 4e 54 | 45 52 52 55 50 54 49 4f |NESS INT|ERRUPTIO|
|00003c20| 4e 29 0a 20 2a 20 48 4f | 57 45 56 45 52 20 43 41 |N). * HO|WEVER CA|
|00003c30| 55 53 45 44 20 41 4e 44 | 20 4f 4e 20 41 4e 59 20 |USED AND| ON ANY |
|00003c40| 54 48 45 4f 52 59 20 4f | 46 20 4c 49 41 42 49 4c |THEORY O|F LIABIL|
|00003c50| 49 54 59 2c 20 57 48 45 | 54 48 45 52 20 49 4e 20 |ITY, WHE|THER IN |
|00003c60| 43 4f 4e 54 52 41 43 54 | 2c 20 53 54 52 49 43 54 |CONTRACT|, STRICT|
|00003c70| 0a 20 2a 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 4f |. * LIAB|ILITY, O|
|00003c80| 52 20 54 4f 52 54 20 28 | 49 4e 43 4c 55 44 49 4e |R TORT (|INCLUDIN|
|00003c90| 47 20 4e 45 47 4c 49 47 | 45 4e 43 45 20 4f 52 20 |G NEGLIG|ENCE OR |
|00003ca0| 4f 54 48 45 52 57 49 53 | 45 29 20 41 52 49 53 49 |OTHERWIS|E) ARISI|
|00003cb0| 4e 47 20 49 4e 20 41 4e | 59 20 57 41 59 0a 20 2a |NG IN AN|Y WAY. *|
|00003cc0| 20 4f 55 54 20 4f 46 20 | 54 48 45 20 55 53 45 20 | OUT OF |THE USE |
|00003cd0| 4f 46 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 |OF THIS |SOFTWARE|
|00003ce0| 2c 20 45 56 45 4e 20 49 | 46 20 41 44 56 49 53 45 |, EVEN I|F ADVISE|
|00003cf0| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|00003d00| 4c 49 54 59 20 4f 46 0a | 20 2a 20 53 55 43 48 20 |LITY OF.| * SUCH |
|00003d10| 44 41 4d 41 47 45 2e 0a | 20 2a 2f 0a 0a 23 69 66 |DAMAGE..| */..#if|
|00003d20| 6e 64 65 66 20 6c 69 6e | 74 0a 73 74 61 74 69 63 |ndef lin|t.static|
|00003d30| 20 63 68 61 72 20 73 63 | 63 73 69 64 5b 5d 20 3d | char sc|csid[] =|
|00003d40| 20 22 40 28 23 29 70 72 | 69 6e 74 2e 63 09 35 2e | "@(#)pr|int.c.5.|
|00003d50| 38 20 28 42 65 72 6b 65 | 6c 65 79 29 20 32 2f 32 |8 (Berke|ley) 2/2|
|00003d60| 36 2f 39 31 22 3b 0a 23 | 65 6e 64 69 66 20 2f 2a |6/91";.#|endif /*|
|00003d70| 20 6e 6f 74 20 6c 69 6e | 74 20 2a 2f 0a 0a 2f 2a | not lin|t */../*|
|00003d80| 20 64 65 62 75 67 20 70 | 72 69 6e 74 20 72 6f 75 | debug p|rint rou|
|00003d90| 74 69 6e 65 73 20 2a 2f | 0a 0a 23 69 6e 63 6c 75 |tines */|..#inclu|
|00003da0| 64 65 20 3c 73 79 73 2f | 74 79 70 65 73 2e 68 3e |de <sys/|types.h>|
|00003db0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 73 |.#includ|e <sys/s|
|00003dc0| 6f 63 6b 65 74 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ocket.h>|.#includ|
|00003dd0| 65 20 3c 70 72 6f 74 6f | 63 6f 6c 73 2f 74 61 6c |e <proto|cols/tal|
|00003de0| 6b 64 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |kd.h>.#i|nclude <|
|00003df0| 73 79 73 6c 6f 67 2e 68 | 3e 0a 23 69 6e 63 6c 75 |syslog.h|>.#inclu|
|00003e00| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 0a 73 74 |de <stdi|o.h>..st|
|00003e10| 61 74 69 63 09 63 68 61 | 72 20 2a 74 79 70 65 73 |atic.cha|r *types|
|00003e20| 5b 5d 20 3d 0a 20 20 20 | 20 7b 20 22 6c 65 61 76 |[] =. | { "leav|
|00003e30| 65 5f 69 6e 76 69 74 65 | 22 2c 20 22 6c 6f 6f 6b |e_invite|", "look|
|00003e40| 5f 75 70 22 2c 20 22 64 | 65 6c 65 74 65 22 2c 20 |_up", "d|elete", |
|00003e50| 22 61 6e 6e 6f 75 6e 63 | 65 22 20 7d 3b 0a 23 64 |"announc|e" };.#d|
|00003e60| 65 66 69 6e 65 09 4e 54 | 59 50 45 53 09 28 73 69 |efine.NT|YPES.(si|
|00003e70| 7a 65 6f 66 20 28 74 79 | 70 65 73 29 20 2f 20 73 |zeof (ty|pes) / s|
|00003e80| 69 7a 65 6f 66 20 28 74 | 79 70 65 73 5b 30 5d 29 |izeof (t|ypes[0])|
|00003e90| 29 0a 73 74 61 74 69 63 | 09 63 68 61 72 20 2a 61 |).static|.char *a|
|00003ea0| 6e 73 77 65 72 73 5b 5d | 20 3d 20 0a 20 20 20 20 |nswers[]| = . |
|00003eb0| 7b 20 22 73 75 63 63 65 | 73 73 22 2c 20 22 6e 6f |{ "succe|ss", "no|
|00003ec0| 74 5f 68 65 72 65 22 2c | 20 22 66 61 69 6c 65 64 |t_here",| "failed|
|00003ed0| 22 2c 20 22 6d 61 63 68 | 69 6e 65 5f 75 6e 6b 6e |", "mach|ine_unkn|
|00003ee0| 6f 77 6e 22 2c 20 22 70 | 65 72 6d 69 73 73 69 6f |own", "p|ermissio|
|00003ef0| 6e 5f 64 65 6e 69 65 64 | 22 2c 0a 20 20 20 20 20 |n_denied|",. |
|00003f00| 20 22 75 6e 6b 6e 6f 77 | 6e 5f 72 65 71 75 65 73 | "unknow|n_reques|
|00003f10| 74 22 2c 20 22 62 61 64 | 76 65 72 73 69 6f 6e 22 |t", "bad|version"|
|00003f20| 2c 20 22 62 61 64 61 64 | 64 72 22 2c 20 22 62 61 |, "badad|dr", "ba|
|00003f30| 64 63 74 6c 61 64 64 72 | 22 20 7d 3b 0a 23 64 65 |dctladdr|" };.#de|
|00003f40| 66 69 6e 65 09 4e 41 4e | 53 57 45 52 53 09 28 73 |fine.NAN|SWERS.(s|
|00003f50| 69 7a 65 6f 66 20 28 61 | 6e 73 77 65 72 73 29 20 |izeof (a|nswers) |
|00003f60| 2f 20 73 69 7a 65 6f 66 | 20 28 61 6e 73 77 65 72 |/ sizeof| (answer|
|00003f70| 73 5b 30 5d 29 29 0a 0a | 70 72 69 6e 74 5f 72 65 |s[0]))..|print_re|
|00003f80| 71 75 65 73 74 28 63 70 | 2c 20 6d 70 29 0a 09 63 |quest(cp|, mp)..c|
|00003f90| 68 61 72 20 2a 63 70 3b | 0a 09 72 65 67 69 73 74 |har *cp;|..regist|
|00003fa0| 65 72 20 43 54 4c 5f 4d | 53 47 20 2a 6d 70 3b 0a |er CTL_M|SG *mp;.|
|00003fb0| 7b 0a 09 63 68 61 72 20 | 74 62 75 66 5b 38 30 5d |{..char |tbuf[80]|
|00003fc0| 2c 20 2a 74 70 3b 0a 09 | 0a 09 69 66 20 28 6d 70 |, *tp;..|..if (mp|
|00003fd0| 2d 3e 74 79 70 65 20 3e | 20 4e 54 59 50 45 53 29 |->type >| NTYPES)|
|00003fe0| 20 7b 0a 09 09 28 76 6f | 69 64 29 73 70 72 69 6e | {...(vo|id)sprin|
|00003ff0| 74 66 28 74 62 75 66 2c | 20 22 74 79 70 65 20 25 |tf(tbuf,| "type %|
|00004000| 64 22 2c 20 6d 70 2d 3e | 74 79 70 65 29 3b 0a 09 |d", mp->|type);..|
|00004010| 09 74 70 20 3d 20 74 62 | 75 66 3b 0a 09 7d 20 65 |.tp = tb|uf;..} e|
|00004020| 6c 73 65 0a 09 09 74 70 | 20 3d 20 74 79 70 65 73 |lse...tp| = types|
|00004030| 5b 6d 70 2d 3e 74 79 70 | 65 5d 3b 0a 09 73 79 73 |[mp->typ|e];..sys|
|00004040| 6c 6f 67 28 4c 4f 47 5f | 44 45 42 55 47 2c 20 22 |log(LOG_|DEBUG, "|
|00004050| 25 73 3a 20 25 73 3a 20 | 69 64 20 25 64 2c 20 6c |%s: %s: |id %d, l|
|00004060| 5f 75 73 65 72 20 25 73 | 2c 20 72 5f 75 73 65 72 |_user %s|, r_user|
|00004070| 20 25 73 2c 20 72 5f 74 | 74 79 20 25 73 22 2c 0a | %s, r_t|ty %s",.|
|00004080| 09 20 20 20 20 63 70 2c | 20 74 70 2c 20 6d 70 2d |. cp,| tp, mp-|
|00004090| 3e 69 64 5f 6e 75 6d 2c | 20 6d 70 2d 3e 6c 5f 6e |>id_num,| mp->l_n|
|000040a0| 61 6d 65 2c 20 6d 70 2d | 3e 72 5f 6e 61 6d 65 2c |ame, mp-|>r_name,|
|000040b0| 20 6d 70 2d 3e 72 5f 74 | 74 79 29 3b 0a 7d 0a 0a | mp->r_t|ty);.}..|
|000040c0| 70 72 69 6e 74 5f 72 65 | 73 70 6f 6e 73 65 28 63 |print_re|sponse(c|
|000040d0| 70 2c 20 72 70 29 0a 09 | 63 68 61 72 20 2a 63 70 |p, rp)..|char *cp|
|000040e0| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 43 54 4c 5f |;..regis|ter CTL_|
|000040f0| 52 45 53 50 4f 4e 53 45 | 20 2a 72 70 3b 0a 7b 0a |RESPONSE| *rp;.{.|
|00004100| 09 63 68 61 72 20 74 62 | 75 66 5b 38 30 5d 2c 20 |.char tb|uf[80], |
|00004110| 2a 74 70 2c 20 61 62 75 | 66 5b 38 30 5d 2c 20 2a |*tp, abu|f[80], *|
|00004120| 61 70 3b 0a 09 0a 09 69 | 66 20 28 72 70 2d 3e 74 |ap;....i|f (rp->t|
|00004130| 79 70 65 20 3e 20 4e 54 | 59 50 45 53 29 20 7b 0a |ype > NT|YPES) {.|
|00004140| 09 09 28 76 6f 69 64 29 | 73 70 72 69 6e 74 66 28 |..(void)|sprintf(|
|00004150| 74 62 75 66 2c 20 22 74 | 79 70 65 20 25 64 22 2c |tbuf, "t|ype %d",|
|00004160| 20 72 70 2d 3e 74 79 70 | 65 29 3b 0a 09 09 74 70 | rp->typ|e);...tp|
|00004170| 20 3d 20 74 62 75 66 3b | 0a 09 7d 20 65 6c 73 65 | = tbuf;|..} else|
|00004180| 0a 09 09 74 70 20 3d 20 | 74 79 70 65 73 5b 72 70 |...tp = |types[rp|
|00004190| 2d 3e 74 79 70 65 5d 3b | 0a 09 69 66 20 28 72 70 |->type];|..if (rp|
|000041a0| 2d 3e 61 6e 73 77 65 72 | 20 3e 20 4e 41 4e 53 57 |->answer| > NANSW|
|000041b0| 45 52 53 29 20 7b 0a 09 | 09 28 76 6f 69 64 29 73 |ERS) {..|.(void)s|
|000041c0| 70 72 69 6e 74 66 28 61 | 62 75 66 2c 20 22 61 6e |printf(a|buf, "an|
|000041d0| 73 77 65 72 20 25 64 22 | 2c 20 72 70 2d 3e 61 6e |swer %d"|, rp->an|
|000041e0| 73 77 65 72 29 3b 0a 09 | 09 61 70 20 3d 20 61 62 |swer);..|.ap = ab|
|000041f0| 75 66 3b 0a 09 7d 20 65 | 6c 73 65 0a 09 09 61 70 |uf;..} e|lse...ap|
|00004200| 20 3d 20 61 6e 73 77 65 | 72 73 5b 72 70 2d 3e 61 | = answe|rs[rp->a|
|00004210| 6e 73 77 65 72 5d 3b 0a | 09 73 79 73 6c 6f 67 28 |nswer];.|.syslog(|
|00004220| 4c 4f 47 5f 44 45 42 55 | 47 2c 20 22 25 73 3a 20 |LOG_DEBU|G, "%s: |
|00004230| 25 73 3a 20 25 73 2c 20 | 69 64 20 25 64 22 2c 20 |%s: %s, |id %d", |
|00004240| 63 70 2c 20 74 70 2c 20 | 61 70 2c 20 6e 74 6f 68 |cp, tp, |ap, ntoh|
|00004250| 6c 28 72 70 2d 3e 69 64 | 5f 6e 75 6d 29 29 3b 0a |l(rp->id|_num));.|
|00004260| 7d 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |}.......|........|
|00004270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004400| 70 72 6f 63 65 73 73 2e | 63 00 00 00 00 00 00 00 |process.|c.......|
|00004410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00004470| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00004480| 20 20 31 33 34 37 36 20 | 20 35 30 30 31 34 32 32 | 13476 | 5001422|
|00004490| 35 34 33 20 20 31 30 37 | 37 35 00 20 30 00 00 00 |543 107|75. 0...|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00004610| 28 63 29 20 31 39 38 33 | 20 52 65 67 65 6e 74 73 |(c) 1983| Regents|
|00004620| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00004630| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00004640| 2e 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.. * All| rights |
|00004650| 72 65 73 65 72 76 65 64 | 2e 0a 20 2a 0a 20 2a 20 |reserved|.. *. * |
|00004660| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00004670| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00004680| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00004690| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|000046a0| 75 74 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|000046b0| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|000046c0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|000046d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000046e0| 6e 64 69 74 69 6f 6e 73 | 0a 20 2a 20 61 72 65 20 |nditions|. * are |
|000046f0| 6d 65 74 3a 0a 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|00004700| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|00004710| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00004720| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00004730| 63 6f 70 79 72 69 67 68 | 74 0a 20 2a 20 20 20 20 |copyrigh|t. * |
|00004740| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00004750| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00004760| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00004770| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 20 2a |g discla|imer.. *|
|00004780| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00004790| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|000047a0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|000047b0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000047c0| 72 69 67 68 74 0a 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|000047d0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|000047e0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|000047f0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|00004800| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0a |sclaimer| in the.|
|00004810| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00004820| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00004830| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00004840| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00004850| 74 72 69 62 75 74 69 6f | 6e 2e 0a 20 2a 20 33 2e |tributio|n.. * 3.|
|00004860| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00004870| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00004880| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00004890| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|000048a0| 66 74 77 61 72 65 0a 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|000048b0| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|000048c0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|000048d0| 64 67 65 6d 65 6e 74 3a | 0a 20 2a 09 54 68 69 73 |dgement:|. *.This|
|000048e0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|000048f0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|00004900| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|00004910| 65 72 73 69 74 79 20 6f | 66 0a 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00004920| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00004930| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00004940| 62 75 74 6f 72 73 2e 0a | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00004950| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00004960| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00004970| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00004980| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00004990| 72 73 0a 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|000049a0| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|000049b0| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|000049c0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000049d0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0a 20 | this so|ftware. |
|000049e0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|000049f0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|00004a00| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0a |ten perm|ission..|
|00004a10| 20 2a 0a 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 | *. * TH|IS SOFTW|
|00004a20| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00004a30| 42 59 20 54 48 45 20 52 | 45 47 45 4e 54 53 20 41 |BY THE R|EGENTS A|
|00004a40| 4e 44 20 43 4f 4e 54 52 | 49 42 55 54 4f 52 53 20 |ND CONTR|IBUTORS |
|00004a50| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 0a 20 2a |``AS IS'|' AND. *|
|00004a60| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 20 | ANY EXP|RESS OR |
|00004a70| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00004a80| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B|
|00004a90| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|00004aa0| 4f 2c 20 54 48 45 0a 20 | 2a 20 49 4d 50 4c 49 45 |O, THE. |* IMPLIE|
|00004ab0| 44 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |D WARRAN|TIES OF |
|00004ac0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|00004ad0| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|00004ae0| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00004af0| 50 4f 53 45 0a 20 2a 20 | 41 52 45 20 44 49 53 43 |POSE. * |ARE DISC|
|00004b00| 4c 41 49 4d 45 44 2e 20 | 20 49 4e 20 4e 4f 20 45 |LAIMED. | IN NO E|
|00004b10| 56 45 4e 54 20 53 48 41 | 4c 4c 20 54 48 45 20 52 |VENT SHA|LL THE R|
|00004b20| 45 47 45 4e 54 53 20 4f | 52 20 43 4f 4e 54 52 49 |EGENTS O|R CONTRI|
|00004b30| 42 55 54 4f 52 53 20 42 | 45 20 4c 49 41 42 4c 45 |BUTORS B|E LIABLE|
|00004b40| 0a 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |. * FOR |ANY DIRE|
|00004b50| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00004b60| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00004b70| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00004b80| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0a 20 | CONSEQU|ENTIAL. |
|00004b90| 2a 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |* DAMAGE|S (INCLU|
|00004ba0| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|00004bb0| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|00004bc0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|00004bd0| 55 54 45 20 47 4f 4f 44 | 53 0a 20 2a 20 4f 52 20 |UTE GOOD|S. * OR |
|00004be0| 53 45 52 56 49 43 45 53 | 3b 20 4c 4f 53 53 20 4f |SERVICES|; LOSS O|
|00004bf0| 46 20 55 53 45 2c 20 44 | 41 54 41 2c 20 4f 52 20 |F USE, D|ATA, OR |
|00004c00| 50 52 4f 46 49 54 53 3b | 20 4f 52 20 42 55 53 49 |PROFITS;| OR BUSI|
|00004c10| 4e 45 53 53 20 49 4e 54 | 45 52 52 55 50 54 49 4f |NESS INT|ERRUPTIO|
|00004c20| 4e 29 0a 20 2a 20 48 4f | 57 45 56 45 52 20 43 41 |N). * HO|WEVER CA|
|00004c30| 55 53 45 44 20 41 4e 44 | 20 4f 4e 20 41 4e 59 20 |USED AND| ON ANY |
|00004c40| 54 48 45 4f 52 59 20 4f | 46 20 4c 49 41 42 49 4c |THEORY O|F LIABIL|
|00004c50| 49 54 59 2c 20 57 48 45 | 54 48 45 52 20 49 4e 20 |ITY, WHE|THER IN |
|00004c60| 43 4f 4e 54 52 41 43 54 | 2c 20 53 54 52 49 43 54 |CONTRACT|, STRICT|
|00004c70| 0a 20 2a 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 4f |. * LIAB|ILITY, O|
|00004c80| 52 20 54 4f 52 54 20 28 | 49 4e 43 4c 55 44 49 4e |R TORT (|INCLUDIN|
|00004c90| 47 20 4e 45 47 4c 49 47 | 45 4e 43 45 20 4f 52 20 |G NEGLIG|ENCE OR |
|00004ca0| 4f 54 48 45 52 57 49 53 | 45 29 20 41 52 49 53 49 |OTHERWIS|E) ARISI|
|00004cb0| 4e 47 20 49 4e 20 41 4e | 59 20 57 41 59 0a 20 2a |NG IN AN|Y WAY. *|
|00004cc0| 20 4f 55 54 20 4f 46 20 | 54 48 45 20 55 53 45 20 | OUT OF |THE USE |
|00004cd0| 4f 46 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 |OF THIS |SOFTWARE|
|00004ce0| 2c 20 45 56 45 4e 20 49 | 46 20 41 44 56 49 53 45 |, EVEN I|F ADVISE|
|00004cf0| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|00004d00| 4c 49 54 59 20 4f 46 0a | 20 2a 20 53 55 43 48 20 |LITY OF.| * SUCH |
|00004d10| 44 41 4d 41 47 45 2e 0a | 20 2a 2f 0a 0a 23 69 66 |DAMAGE..| */..#if|
|00004d20| 6e 64 65 66 20 6c 69 6e | 74 0a 73 74 61 74 69 63 |ndef lin|t.static|
|00004d30| 20 63 68 61 72 20 73 63 | 63 73 69 64 5b 5d 20 3d | char sc|csid[] =|
|00004d40| 20 22 40 28 23 29 70 72 | 6f 63 65 73 73 2e 63 09 | "@(#)pr|ocess.c.|
|00004d50| 35 2e 31 30 20 28 42 65 | 72 6b 65 6c 65 79 29 20 |5.10 (Be|rkeley) |
|00004d60| 32 2f 32 36 2f 39 31 22 | 3b 0a 23 65 6e 64 69 66 |2/26/91"|;.#endif|
|00004d70| 20 2f 2a 20 6e 6f 74 20 | 6c 69 6e 74 20 2a 2f 0a | /* not |lint */.|
|00004d80| 0a 2f 2a 0a 20 2a 20 70 | 72 6f 63 65 73 73 2e 63 |./*. * p|rocess.c|
|00004d90| 20 68 61 6e 64 6c 65 73 | 20 74 68 65 20 72 65 71 | handles| the req|
|00004da0| 75 65 73 74 73 2c 20 77 | 68 69 63 68 20 63 61 6e |uests, w|hich can|
|00004db0| 20 62 65 20 6f 66 20 74 | 68 72 65 65 20 74 79 70 | be of t|hree typ|
|00004dc0| 65 73 3a 0a 20 2a 09 41 | 4e 4e 4f 55 4e 43 45 20 |es:. *.A|NNOUNCE |
|00004dd0| 2d 20 61 6e 6e 6f 75 6e | 63 65 20 74 6f 20 61 20 |- announ|ce to a |
|00004de0| 75 73 65 72 20 74 68 61 | 74 20 61 20 74 61 6c 6b |user tha|t a talk|
|00004df0| 20 69 73 20 77 61 6e 74 | 65 64 0a 20 2a 09 4c 45 | is want|ed. *.LE|
|00004e00| 41 56 45 5f 49 4e 56 49 | 54 45 20 2d 20 69 6e 73 |AVE_INVI|TE - ins|
|00004e10| 65 72 74 20 74 68 65 20 | 72 65 71 75 65 73 74 20 |ert the |request |
|00004e20| 69 6e 74 6f 20 74 68 65 | 20 74 61 62 6c 65 0a 20 |into the| table. |
|00004e30| 2a 09 4c 4f 4f 4b 5f 55 | 50 20 2d 20 6c 6f 6f 6b |*.LOOK_U|P - look|
|00004e40| 20 75 70 20 74 6f 20 73 | 65 65 20 69 66 20 61 20 | up to s|ee if a |
|00004e50| 72 65 71 75 65 73 74 20 | 69 73 20 77 61 69 74 69 |request |is waiti|
|00004e60| 6e 67 20 69 6e 0a 20 2a | 09 09 20 20 69 6e 20 74 |ng in. *|.. in t|
|00004e70| 68 65 20 74 61 62 6c 65 | 20 66 6f 72 20 74 68 65 |he table| for the|
|00004e80| 20 6c 6f 63 61 6c 20 75 | 73 65 72 0a 20 2a 09 44 | local u|ser. *.D|
|00004e90| 45 4c 45 54 45 20 2d 20 | 64 65 6c 65 74 65 20 69 |ELETE - |delete i|
|00004ea0| 6e 76 69 74 61 74 69 6f | 6e 0a 20 2a 2f 0a 23 69 |nvitatio|n. */.#i|
|00004eb0| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 70 61 72 61 |nclude <|sys/para|
|00004ec0| 6d 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |m.h>.#in|clude <s|
|00004ed0| 79 73 2f 73 74 61 74 2e | 68 3e 0a 23 69 6e 63 6c |ys/stat.|h>.#incl|
|00004ee0| 75 64 65 20 3c 73 79 73 | 2f 73 6f 63 6b 65 74 2e |ude <sys|/socket.|
|00004ef0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 6e 65 74 |h>.#incl|ude <net|
|00004f00| 69 6e 65 74 2f 69 6e 2e | 68 3e 0a 23 69 6e 63 6c |inet/in.|h>.#incl|
|00004f10| 75 64 65 20 3c 70 72 6f | 74 6f 63 6f 6c 73 2f 74 |ude <pro|tocols/t|
|00004f20| 61 6c 6b 64 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |alkd.h>.|#include|
|00004f30| 20 3c 6e 65 74 64 62 2e | 68 3e 0a 23 69 6e 63 6c | <netdb.|h>.#incl|
|00004f40| 75 64 65 20 3c 73 79 73 | 6c 6f 67 2e 68 3e 0a 23 |ude <sys|log.h>.#|
|00004f50| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|00004f60| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 72 69 |>.#inclu|de <stri|
|00004f70| 6e 67 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |ng.h>.#i|nclude <|
|00004f80| 70 61 74 68 73 2e 68 3e | 0a 0a 43 54 4c 5f 4d 53 |paths.h>|..CTL_MS|
|00004f90| 47 20 2a 66 69 6e 64 5f | 72 65 71 75 65 73 74 28 |G *find_|request(|
|00004fa0| 29 3b 0a 43 54 4c 5f 4d | 53 47 20 2a 66 69 6e 64 |);.CTL_M|SG *find|
|00004fb0| 5f 6d 61 74 63 68 28 29 | 3b 0a 0a 70 72 6f 63 65 |_match()|;..proce|
|00004fc0| 73 73 5f 72 65 71 75 65 | 73 74 28 6d 70 2c 20 72 |ss_reque|st(mp, r|
|00004fd0| 70 29 0a 09 72 65 67 69 | 73 74 65 72 20 43 54 4c |p)..regi|ster CTL|
|00004fe0| 5f 4d 53 47 20 2a 6d 70 | 3b 0a 09 72 65 67 69 73 |_MSG *mp|;..regis|
|00004ff0| 74 65 72 20 43 54 4c 5f | 52 45 53 50 4f 4e 53 45 |ter CTL_|RESPONSE|
|00005000| 20 2a 72 70 3b 0a 7b 0a | 09 72 65 67 69 73 74 65 | *rp;.{.|.registe|
|00005010| 72 20 43 54 4c 5f 4d 53 | 47 20 2a 70 74 72 3b 0a |r CTL_MS|G *ptr;.|
|00005020| 09 65 78 74 65 72 6e 20 | 69 6e 74 20 64 65 62 75 |.extern |int debu|
|00005030| 67 3b 0a 0a 09 72 70 2d | 3e 76 65 72 73 20 3d 20 |g;...rp-|>vers = |
|00005040| 54 41 4c 4b 5f 56 45 52 | 53 49 4f 4e 3b 0a 09 72 |TALK_VER|SION;..r|
|00005050| 70 2d 3e 74 79 70 65 20 | 3d 20 6d 70 2d 3e 74 79 |p->type |= mp->ty|
|00005060| 70 65 3b 0a 09 72 70 2d | 3e 69 64 5f 6e 75 6d 20 |pe;..rp-|>id_num |
|00005070| 3d 20 68 74 6f 6e 6c 28 | 30 29 3b 0a 09 69 66 20 |= htonl(|0);..if |
|00005080| 28 6d 70 2d 3e 76 65 72 | 73 20 21 3d 20 54 41 4c |(mp->ver|s != TAL|
|00005090| 4b 5f 56 45 52 53 49 4f | 4e 29 20 7b 0a 09 09 73 |K_VERSIO|N) {...s|
|000050a0| 79 73 6c 6f 67 28 4c 4f | 47 5f 57 41 52 4e 49 4e |yslog(LO|G_WARNIN|
|000050b0| 47 2c 20 22 42 61 64 20 | 70 72 6f 74 6f 63 6f 6c |G, "Bad |protocol|
|000050c0| 20 76 65 72 73 69 6f 6e | 20 25 64 22 2c 20 6d 70 | version| %d", mp|
|000050d0| 2d 3e 76 65 72 73 29 3b | 0a 09 09 72 70 2d 3e 61 |->vers);|...rp->a|
|000050e0| 6e 73 77 65 72 20 3d 20 | 42 41 44 56 45 52 53 49 |nswer = |BADVERSI|
|000050f0| 4f 4e 3b 0a 09 09 72 65 | 74 75 72 6e 3b 0a 09 7d |ON;...re|turn;..}|
|00005100| 0a 09 6d 70 2d 3e 69 64 | 5f 6e 75 6d 20 3d 20 6e |..mp->id|_num = n|
|00005110| 74 6f 68 6c 28 6d 70 2d | 3e 69 64 5f 6e 75 6d 29 |tohl(mp-|>id_num)|
|00005120| 3b 0a 09 6d 70 2d 3e 61 | 64 64 72 2e 73 61 5f 66 |;..mp->a|ddr.sa_f|
|00005130| 61 6d 69 6c 79 20 3d 20 | 6e 74 6f 68 73 28 6d 70 |amily = |ntohs(mp|
|00005140| 2d 3e 61 64 64 72 2e 73 | 61 5f 66 61 6d 69 6c 79 |->addr.s|a_family|
|00005150| 29 3b 0a 09 69 66 20 28 | 6d 70 2d 3e 61 64 64 72 |);..if (|mp->addr|
|00005160| 2e 73 61 5f 66 61 6d 69 | 6c 79 20 21 3d 20 41 46 |.sa_fami|ly != AF|
|00005170| 5f 49 4e 45 54 29 20 7b | 0a 09 09 73 79 73 6c 6f |_INET) {|...syslo|
|00005180| 67 28 4c 4f 47 5f 57 41 | 52 4e 49 4e 47 2c 20 22 |g(LOG_WA|RNING, "|
|00005190| 42 61 64 20 61 64 64 72 | 65 73 73 2c 20 66 61 6d |Bad addr|ess, fam|
|000051a0| 69 6c 79 20 25 64 22 2c | 0a 09 09 20 20 20 20 6d |ily %d",|... m|
|000051b0| 70 2d 3e 61 64 64 72 2e | 73 61 5f 66 61 6d 69 6c |p->addr.|sa_famil|
|000051c0| 79 29 3b 0a 09 09 72 70 | 2d 3e 61 6e 73 77 65 72 |y);...rp|->answer|
|000051d0| 20 3d 20 42 41 44 41 44 | 44 52 3b 0a 09 09 72 65 | = BADAD|DR;...re|
|000051e0| 74 75 72 6e 3b 0a 09 7d | 0a 09 6d 70 2d 3e 63 74 |turn;..}|..mp->ct|
|000051f0| 6c 5f 61 64 64 72 2e 73 | 61 5f 66 61 6d 69 6c 79 |l_addr.s|a_family|
|00005200| 20 3d 20 6e 74 6f 68 73 | 28 6d 70 2d 3e 63 74 6c | = ntohs|(mp->ctl|
|00005210| 5f 61 64 64 72 2e 73 61 | 5f 66 61 6d 69 6c 79 29 |_addr.sa|_family)|
|00005220| 3b 0a 09 69 66 20 28 6d | 70 2d 3e 63 74 6c 5f 61 |;..if (m|p->ctl_a|
|00005230| 64 64 72 2e 73 61 5f 66 | 61 6d 69 6c 79 20 21 3d |ddr.sa_f|amily !=|
|00005240| 20 41 46 5f 49 4e 45 54 | 29 20 7b 0a 09 09 73 79 | AF_INET|) {...sy|
|00005250| 73 6c 6f 67 28 4c 4f 47 | 5f 57 41 52 4e 49 4e 47 |slog(LOG|_WARNING|
|00005260| 2c 20 22 42 61 64 20 63 | 6f 6e 74 72 6f 6c 20 61 |, "Bad c|ontrol a|
|00005270| 64 64 72 65 73 73 2c 20 | 66 61 6d 69 6c 79 20 25 |ddress, |family %|
|00005280| 64 22 2c 0a 09 09 20 20 | 20 20 6d 70 2d 3e 63 74 |d",... | mp->ct|
|00005290| 6c 5f 61 64 64 72 2e 73 | 61 5f 66 61 6d 69 6c 79 |l_addr.s|a_family|
|000052a0| 29 3b 0a 09 09 72 70 2d | 3e 61 6e 73 77 65 72 20 |);...rp-|>answer |
|000052b0| 3d 20 42 41 44 43 54 4c | 41 44 44 52 3b 0a 09 09 |= BADCTL|ADDR;...|
|000052c0| 72 65 74 75 72 6e 3b 0a | 09 7d 0a 09 6d 70 2d 3e |return;.|.}..mp->|
|000052d0| 70 69 64 20 3d 20 6e 74 | 6f 68 6c 28 6d 70 2d 3e |pid = nt|ohl(mp->|
|000052e0| 70 69 64 29 3b 0a 09 69 | 66 20 28 64 65 62 75 67 |pid);..i|f (debug|
|000052f0| 29 0a 09 09 70 72 69 6e | 74 5f 72 65 71 75 65 73 |)...prin|t_reques|
|00005300| 74 28 22 70 72 6f 63 65 | 73 73 5f 72 65 71 75 65 |t("proce|ss_reque|
|00005310| 73 74 22 2c 20 6d 70 29 | 3b 0a 09 73 77 69 74 63 |st", mp)|;..switc|
|00005320| 68 20 28 6d 70 2d 3e 74 | 79 70 65 29 20 7b 0a 0a |h (mp->t|ype) {..|
|00005330| 09 63 61 73 65 20 41 4e | 4e 4f 55 4e 43 45 3a 0a |.case AN|NOUNCE:.|
|00005340| 09 09 64 6f 5f 61 6e 6e | 6f 75 6e 63 65 28 6d 70 |..do_ann|ounce(mp|
|00005350| 2c 20 72 70 29 3b 0a 09 | 09 62 72 65 61 6b 3b 0a |, rp);..|.break;.|
|00005360| 0a 09 63 61 73 65 20 4c | 45 41 56 45 5f 49 4e 56 |..case L|EAVE_INV|
|00005370| 49 54 45 3a 0a 09 09 70 | 74 72 20 3d 20 66 69 6e |ITE:...p|tr = fin|
|00005380| 64 5f 72 65 71 75 65 73 | 74 28 6d 70 29 3b 0a 09 |d_reques|t(mp);..|
|00005390| 09 69 66 20 28 70 74 72 | 20 21 3d 20 28 43 54 4c |.if (ptr| != (CTL|
|000053a0| 5f 4d 53 47 20 2a 29 30 | 29 20 7b 0a 09 09 09 72 |_MSG *)0|) {....r|
|000053b0| 70 2d 3e 69 64 5f 6e 75 | 6d 20 3d 20 68 74 6f 6e |p->id_nu|m = hton|
|000053c0| 6c 28 70 74 72 2d 3e 69 | 64 5f 6e 75 6d 29 3b 0a |l(ptr->i|d_num);.|
|000053d0| 09 09 09 72 70 2d 3e 61 | 6e 73 77 65 72 20 3d 20 |...rp->a|nswer = |
|000053e0| 53 55 43 43 45 53 53 3b | 0a 09 09 7d 20 65 6c 73 |SUCCESS;|...} els|
|000053f0| 65 0a 09 09 09 69 6e 73 | 65 72 74 5f 74 61 62 6c |e....ins|ert_tabl|
|00005400| 65 28 6d 70 2c 20 72 70 | 29 3b 0a 09 09 62 72 65 |e(mp, rp|);...bre|
|00005410| 61 6b 3b 0a 0a 09 63 61 | 73 65 20 4c 4f 4f 4b 5f |ak;...ca|se LOOK_|
|00005420| 55 50 3a 0a 09 09 70 74 | 72 20 3d 20 66 69 6e 64 |UP:...pt|r = find|
|00005430| 5f 6d 61 74 63 68 28 6d | 70 29 3b 0a 09 09 69 66 |_match(m|p);...if|
|00005440| 20 28 70 74 72 20 21 3d | 20 28 43 54 4c 5f 4d 53 | (ptr !=| (CTL_MS|
|00005450| 47 20 2a 29 30 29 20 7b | 0a 09 09 09 72 70 2d 3e |G *)0) {|....rp->|
|00005460| 69 64 5f 6e 75 6d 20 3d | 20 68 74 6f 6e 6c 28 70 |id_num =| htonl(p|
|00005470| 74 72 2d 3e 69 64 5f 6e | 75 6d 29 3b 0a 09 09 09 |tr->id_n|um);....|
|00005480| 72 70 2d 3e 61 64 64 72 | 20 3d 20 70 74 72 2d 3e |rp->addr| = ptr->|
|00005490| 61 64 64 72 3b 0a 09 09 | 09 72 70 2d 3e 61 64 64 |addr;...|.rp->add|
|000054a0| 72 2e 73 61 5f 66 61 6d | 69 6c 79 20 3d 20 68 74 |r.sa_fam|ily = ht|
|000054b0| 6f 6e 73 28 70 74 72 2d | 3e 61 64 64 72 2e 73 61 |ons(ptr-|>addr.sa|
|000054c0| 5f 66 61 6d 69 6c 79 29 | 3b 0a 09 09 09 72 70 2d |_family)|;....rp-|
|000054d0| 3e 61 6e 73 77 65 72 20 | 3d 20 53 55 43 43 45 53 |>answer |= SUCCES|
|000054e0| 53 3b 0a 09 09 7d 20 65 | 6c 73 65 0a 09 09 09 72 |S;...} e|lse....r|
|000054f0| 70 2d 3e 61 6e 73 77 65 | 72 20 3d 20 4e 4f 54 5f |p->answe|r = NOT_|
|00005500| 48 45 52 45 3b 0a 09 09 | 62 72 65 61 6b 3b 0a 0a |HERE;...|break;..|
|00005510| 09 63 61 73 65 20 44 45 | 4c 45 54 45 3a 0a 09 09 |.case DE|LETE:...|
|00005520| 72 70 2d 3e 61 6e 73 77 | 65 72 20 3d 20 64 65 6c |rp->answ|er = del|
|00005530| 65 74 65 5f 69 6e 76 69 | 74 65 28 6d 70 2d 3e 69 |ete_invi|te(mp->i|
|00005540| 64 5f 6e 75 6d 29 3b 0a | 09 09 62 72 65 61 6b 3b |d_num);.|..break;|
|00005550| 0a 0a 09 64 65 66 61 75 | 6c 74 3a 0a 09 09 72 70 |...defau|lt:...rp|
|00005560| 2d 3e 61 6e 73 77 65 72 | 20 3d 20 55 4e 4b 4e 4f |->answer| = UNKNO|
|00005570| 57 4e 5f 52 45 51 55 45 | 53 54 3b 0a 09 09 62 72 |WN_REQUE|ST;...br|
|00005580| 65 61 6b 3b 0a 09 7d 0a | 09 69 66 20 28 64 65 62 |eak;..}.|.if (deb|
|00005590| 75 67 29 0a 09 09 70 72 | 69 6e 74 5f 72 65 73 70 |ug)...pr|int_resp|
|000055a0| 6f 6e 73 65 28 22 70 72 | 6f 63 65 73 73 5f 72 65 |onse("pr|ocess_re|
|000055b0| 71 75 65 73 74 22 2c 20 | 72 70 29 3b 0a 7d 0a 0a |quest", |rp);.}..|
|000055c0| 64 6f 5f 61 6e 6e 6f 75 | 6e 63 65 28 6d 70 2c 20 |do_annou|nce(mp, |
|000055d0| 72 70 29 0a 09 72 65 67 | 69 73 74 65 72 20 43 54 |rp)..reg|ister CT|
|000055e0| 4c 5f 4d 53 47 20 2a 6d | 70 3b 0a 09 43 54 4c 5f |L_MSG *m|p;..CTL_|
|000055f0| 52 45 53 50 4f 4e 53 45 | 20 2a 72 70 3b 0a 7b 0a |RESPONSE| *rp;.{.|
|00005600| 09 73 74 72 75 63 74 20 | 68 6f 73 74 65 6e 74 20 |.struct |hostent |
|00005610| 2a 68 70 3b 0a 09 43 54 | 4c 5f 4d 53 47 20 2a 70 |*hp;..CT|L_MSG *p|
|00005620| 74 72 3b 0a 09 69 6e 74 | 20 72 65 73 75 6c 74 3b |tr;..int| result;|
|00005630| 0a 0a 09 2f 2a 20 73 65 | 65 20 69 66 20 74 68 65 |.../* se|e if the|
|00005640| 20 75 73 65 72 20 69 73 | 20 6c 6f 67 67 65 64 20 | user is| logged |
|00005650| 2a 2f 0a 09 72 65 73 75 | 6c 74 20 3d 20 66 69 6e |*/..resu|lt = fin|
|00005660| 64 5f 75 73 65 72 28 6d | 70 2d 3e 72 5f 6e 61 6d |d_user(m|p->r_nam|
|00005670| 65 2c 20 6d 70 2d 3e 72 | 5f 74 74 79 29 3b 0a 09 |e, mp->r|_tty);..|
|00005680| 69 66 20 28 72 65 73 75 | 6c 74 20 21 3d 20 53 55 |if (resu|lt != SU|
|00005690| 43 43 45 53 53 29 20 7b | 0a 09 09 72 70 2d 3e 61 |CCESS) {|...rp->a|
|000056a0| 6e 73 77 65 72 20 3d 20 | 72 65 73 75 6c 74 3b 0a |nswer = |result;.|
|000056b0| 09 09 72 65 74 75 72 6e | 3b 0a 09 7d 0a 23 64 65 |..return|;..}.#de|
|000056c0| 66 69 6e 65 09 73 61 74 | 6f 73 69 6e 28 73 61 29 |fine.sat|osin(sa)|
|000056d0| 09 28 28 73 74 72 75 63 | 74 20 73 6f 63 6b 61 64 |.((struc|t sockad|
|000056e0| 64 72 5f 69 6e 20 2a 29 | 28 73 61 29 29 0a 09 68 |dr_in *)|(sa))..h|
|000056f0| 70 20 3d 20 67 65 74 68 | 6f 73 74 62 79 61 64 64 |p = geth|ostbyadd|
|00005700| 72 28 28 63 68 61 72 20 | 2a 29 26 73 61 74 6f 73 |r((char |*)&satos|
|00005710| 69 6e 28 26 6d 70 2d 3e | 63 74 6c 5f 61 64 64 72 |in(&mp->|ctl_addr|
|00005720| 29 2d 3e 73 69 6e 5f 61 | 64 64 72 2c 0a 09 09 73 |)->sin_a|ddr,...s|
|00005730| 69 7a 65 6f 66 20 28 73 | 74 72 75 63 74 20 69 6e |izeof (s|truct in|
|00005740| 5f 61 64 64 72 29 2c 20 | 41 46 5f 49 4e 45 54 29 |_addr), |AF_INET)|
|00005750| 3b 0a 09 69 66 20 28 68 | 70 20 3d 3d 20 28 73 74 |;..if (h|p == (st|
|00005760| 72 75 63 74 20 68 6f 73 | 74 65 6e 74 20 2a 29 30 |ruct hos|tent *)0|
|00005770| 29 20 7b 0a 09 09 72 70 | 2d 3e 61 6e 73 77 65 72 |) {...rp|->answer|
|00005780| 20 3d 20 4d 41 43 48 49 | 4e 45 5f 55 4e 4b 4e 4f | = MACHI|NE_UNKNO|
|00005790| 57 4e 3b 0a 09 09 72 65 | 74 75 72 6e 3b 0a 09 7d |WN;...re|turn;..}|
|000057a0| 0a 09 70 74 72 20 3d 20 | 66 69 6e 64 5f 72 65 71 |..ptr = |find_req|
|000057b0| 75 65 73 74 28 6d 70 29 | 3b 0a 09 69 66 20 28 70 |uest(mp)|;..if (p|
|000057c0| 74 72 20 3d 3d 20 28 43 | 54 4c 5f 4d 53 47 20 2a |tr == (C|TL_MSG *|
|000057d0| 29 20 30 29 20 7b 0a 09 | 09 69 6e 73 65 72 74 5f |) 0) {..|.insert_|
|000057e0| 74 61 62 6c 65 28 6d 70 | 2c 20 72 70 29 3b 0a 09 |table(mp|, rp);..|
|000057f0| 09 72 70 2d 3e 61 6e 73 | 77 65 72 20 3d 20 61 6e |.rp->ans|wer = an|
|00005800| 6e 6f 75 6e 63 65 28 6d | 70 2c 20 68 70 2d 3e 68 |nounce(m|p, hp->h|
|00005810| 5f 6e 61 6d 65 29 3b 0a | 09 09 72 65 74 75 72 6e |_name);.|..return|
|00005820| 3b 0a 09 7d 0a 09 69 66 | 20 28 6d 70 2d 3e 69 64 |;..}..if| (mp->id|
|00005830| 5f 6e 75 6d 20 3e 20 70 | 74 72 2d 3e 69 64 5f 6e |_num > p|tr->id_n|
|00005840| 75 6d 29 20 7b 0a 09 09 | 2f 2a 0a 09 09 20 2a 20 |um) {...|/*... * |
|00005850| 54 68 69 73 20 69 73 20 | 61 6e 20 65 78 70 6c 69 |This is |an expli|
|00005860| 63 69 74 20 72 65 2d 61 | 6e 6e 6f 75 6e 63 65 2c |cit re-a|nnounce,|
|00005870| 20 73 6f 20 75 70 64 61 | 74 65 20 74 68 65 20 69 | so upda|te the i|
|00005880| 64 5f 6e 75 6d 0a 09 09 | 20 2a 20 66 69 65 6c 64 |d_num...| * field|
|00005890| 20 74 6f 20 61 76 6f 69 | 64 20 64 75 70 6c 69 63 | to avoi|d duplic|
|000058a0| 61 74 65 73 20 61 6e 64 | 20 72 65 2d 61 6e 6e 6f |ates and| re-anno|
|000058b0| 75 6e 63 65 20 74 68 65 | 20 74 61 6c 6b 2e 0a 09 |unce the| talk...|
|000058c0| 09 20 2a 2f 0a 09 09 70 | 74 72 2d 3e 69 64 5f 6e |. */...p|tr->id_n|
|000058d0| 75 6d 20 3d 20 6e 65 77 | 5f 69 64 28 29 3b 0a 09 |um = new|_id();..|
|000058e0| 09 72 70 2d 3e 69 64 5f | 6e 75 6d 20 3d 20 68 74 |.rp->id_|num = ht|
|000058f0| 6f 6e 6c 28 70 74 72 2d | 3e 69 64 5f 6e 75 6d 29 |onl(ptr-|>id_num)|
|00005900| 3b 0a 09 09 72 70 2d 3e | 61 6e 73 77 65 72 20 3d |;...rp->|answer =|
|00005910| 20 61 6e 6e 6f 75 6e 63 | 65 28 6d 70 2c 20 68 70 | announc|e(mp, hp|
|00005920| 2d 3e 68 5f 6e 61 6d 65 | 29 3b 0a 09 7d 20 65 6c |->h_name|);..} el|
|00005930| 73 65 20 7b 0a 09 09 2f | 2a 20 61 20 64 75 70 6c |se {.../|* a dupl|
|00005940| 69 63 61 74 65 64 20 72 | 65 71 75 65 73 74 2c 20 |icated r|equest, |
|00005950| 73 6f 20 69 67 6e 6f 72 | 65 20 69 74 20 2a 2f 0a |so ignor|e it */.|
|00005960| 09 09 72 70 2d 3e 69 64 | 5f 6e 75 6d 20 3d 20 68 |..rp->id|_num = h|
|00005970| 74 6f 6e 6c 28 70 74 72 | 2d 3e 69 64 5f 6e 75 6d |tonl(ptr|->id_num|
|00005980| 29 3b 0a 09 09 72 70 2d | 3e 61 6e 73 77 65 72 20 |);...rp-|>answer |
|00005990| 3d 20 53 55 43 43 45 53 | 53 3b 0a 09 7d 0a 7d 0a |= SUCCES|S;..}.}.|
|000059a0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 75 74 6d 70 2e |.#includ|e <utmp.|
|000059b0| 68 3e 0a 0a 2f 2a 0a 20 | 2a 20 53 65 61 72 63 68 |h>../*. |* Search|
|000059c0| 20 75 74 6d 70 20 66 6f | 72 20 74 68 65 20 6c 6f | utmp fo|r the lo|
|000059d0| 63 61 6c 20 75 73 65 72 | 0a 20 2a 2f 0a 66 69 6e |cal user|. */.fin|
|000059e0| 64 5f 75 73 65 72 28 6e | 61 6d 65 2c 20 74 74 79 |d_user(n|ame, tty|
|000059f0| 29 0a 09 63 68 61 72 20 | 2a 6e 61 6d 65 2c 20 2a |)..char |*name, *|
|00005a00| 74 74 79 3b 0a 7b 0a 09 | 73 74 72 75 63 74 20 75 |tty;.{..|struct u|
|00005a10| 74 6d 70 20 75 62 75 66 | 3b 0a 09 69 6e 74 20 73 |tmp ubuf|;..int s|
|00005a20| 74 61 74 75 73 3b 0a 09 | 46 49 4c 45 20 2a 66 64 |tatus;..|FILE *fd|
|00005a30| 3b 0a 09 73 74 72 75 63 | 74 20 73 74 61 74 20 73 |;..struc|t stat s|
|00005a40| 74 61 74 62 3b 0a 09 63 | 68 61 72 20 66 74 74 79 |tatb;..c|har ftty|
|00005a50| 5b 32 30 5d 3b 0a 0a 09 | 69 66 20 28 28 66 64 20 |[20];...|if ((fd |
|00005a60| 3d 20 66 6f 70 65 6e 28 | 5f 50 41 54 48 5f 55 54 |= fopen(|_PATH_UT|
|00005a70| 4d 50 2c 20 22 72 22 29 | 29 20 3d 3d 20 4e 55 4c |MP, "r")|) == NUL|
|00005a80| 4c 29 20 7b 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |L) {...f|printf(s|
|00005a90| 74 64 65 72 72 2c 20 22 | 74 61 6c 6b 64 3a 20 63 |tderr, "|talkd: c|
|00005aa0| 61 6e 27 74 20 72 65 61 | 64 20 25 73 2e 5c 6e 22 |an't rea|d %s.\n"|
|00005ab0| 2c 20 5f 50 41 54 48 5f | 55 54 4d 50 29 3b 0a 09 |, _PATH_|UTMP);..|
|00005ac0| 09 72 65 74 75 72 6e 20 | 28 46 41 49 4c 45 44 29 |.return |(FAILED)|
|00005ad0| 3b 0a 09 7d 0a 23 64 65 | 66 69 6e 65 20 53 43 4d |;..}.#de|fine SCM|
|00005ae0| 50 4e 28 61 2c 20 62 29 | 09 73 74 72 6e 63 6d 70 |PN(a, b)|.strncmp|
|00005af0| 28 61 2c 20 62 2c 20 73 | 69 7a 65 6f 66 20 28 61 |(a, b, s|izeof (a|
|00005b00| 29 29 0a 09 73 74 61 74 | 75 73 20 3d 20 4e 4f 54 |))..stat|us = NOT|
|00005b10| 5f 48 45 52 45 3b 0a 09 | 28 76 6f 69 64 29 20 73 |_HERE;..|(void) s|
|00005b20| 74 72 63 70 79 28 66 74 | 74 79 2c 20 5f 50 41 54 |trcpy(ft|ty, _PAT|
|00005b30| 48 5f 44 45 56 29 3b 0a | 09 77 68 69 6c 65 20 28 |H_DEV);.|.while (|
|00005b40| 66 72 65 61 64 28 28 63 | 68 61 72 20 2a 29 20 26 |fread((c|har *) &|
|00005b50| 75 62 75 66 2c 20 73 69 | 7a 65 6f 66 20 75 62 75 |ubuf, si|zeof ubu|
|00005b60| 66 2c 20 31 2c 20 66 64 | 29 20 3d 3d 20 31 29 0a |f, 1, fd|) == 1).|
|00005b70| 09 09 69 66 20 28 53 43 | 4d 50 4e 28 75 62 75 66 |..if (SC|MPN(ubuf|
|00005b80| 2e 75 74 5f 6e 61 6d 65 | 2c 20 6e 61 6d 65 29 20 |.ut_name|, name) |
|00005b90| 3d 3d 20 30 29 20 7b 0a | 09 09 09 69 66 20 28 2a |== 0) {.|...if (*|
|00005ba0| 74 74 79 20 3d 3d 20 27 | 5c 30 27 29 20 7b 0a 09 |tty == '|\0') {..|
|00005bb0| 09 09 09 73 74 61 74 75 | 73 20 3d 20 50 45 52 4d |...statu|s = PERM|
|00005bc0| 49 53 53 49 4f 4e 5f 44 | 45 4e 49 45 44 3b 0a 09 |ISSION_D|ENIED;..|
|00005bd0| 09 09 09 2f 2a 20 6e 6f | 20 70 61 72 74 69 63 75 |.../* no| particu|
|00005be0| 6c 61 72 20 74 74 79 20 | 77 61 73 20 72 65 71 75 |lar tty |was requ|
|00005bf0| 65 73 74 65 64 20 2a 2f | 0a 09 09 09 09 28 76 6f |ested */|.....(vo|
|00005c00| 69 64 29 20 73 74 72 63 | 70 79 28 66 74 74 79 2b |id) strc|py(ftty+|
|00005c10| 35 2c 20 75 62 75 66 2e | 75 74 5f 6c 69 6e 65 29 |5, ubuf.|ut_line)|
|00005c20| 3b 0a 09 09 09 09 69 66 | 20 28 73 74 61 74 28 66 |;.....if| (stat(f|
|00005c30| 74 74 79 2c 26 73 74 61 | 74 62 29 20 3d 3d 20 30 |tty,&sta|tb) == 0|
|00005c40| 29 20 7b 0a 09 09 09 09 | 09 69 66 20 28 21 28 73 |) {.....|.if (!(s|
|00005c50| 74 61 74 62 2e 73 74 5f | 6d 6f 64 65 20 26 20 30 |tatb.st_|mode & 0|
|00005c60| 32 30 29 29 0a 09 09 09 | 09 09 09 63 6f 6e 74 69 |20))....|...conti|
|00005c70| 6e 75 65 3b 0a 09 09 09 | 09 09 28 76 6f 69 64 29 |nue;....|..(void)|
|00005c80| 20 73 74 72 63 70 79 28 | 74 74 79 2c 20 75 62 75 | strcpy(|tty, ubu|
|00005c90| 66 2e 75 74 5f 6c 69 6e | 65 29 3b 0a 09 09 09 09 |f.ut_lin|e);.....|
|00005ca0| 09 73 74 61 74 75 73 20 | 3d 20 53 55 43 43 45 53 |.status |= SUCCES|
|00005cb0| 53 3b 0a 09 09 09 09 09 | 62 72 65 61 6b 3b 0a 09 |S;......|break;..|
|00005cc0| 09 09 09 7d 0a 09 09 09 | 7d 0a 09 09 09 69 66 20 |...}....|}....if |
|00005cd0| 28 73 74 72 63 6d 70 28 | 75 62 75 66 2e 75 74 5f |(strcmp(|ubuf.ut_|
|00005ce0| 6c 69 6e 65 2c 20 74 74 | 79 29 20 3d 3d 20 30 29 |line, tt|y) == 0)|
|00005cf0| 20 7b 0a 09 09 09 09 73 | 74 61 74 75 73 20 3d 20 | {.....s|tatus = |
|00005d00| 53 55 43 43 45 53 53 3b | 0a 09 09 09 09 62 72 65 |SUCCESS;|.....bre|
|00005d10| 61 6b 3b 0a 09 09 09 7d | 0a 09 09 7d 0a 09 66 63 |ak;....}|...}..fc|
|00005d20| 6c 6f 73 65 28 66 64 29 | 3b 0a 09 72 65 74 75 72 |lose(fd)|;..retur|
|00005d30| 6e 20 28 73 74 61 74 75 | 73 29 3b 0a 7d 0a 00 00 |n (statu|s);.}...|
|00005d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e00| 74 61 62 6c 65 2e 63 00 | 00 00 00 00 00 00 00 00 |table.c.|........|
|00005e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e60| 00 00 00 00 31 30 30 36 | 30 30 20 00 20 20 20 20 |....1006|00 . |
|00005e70| 20 30 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 0 . | 0 . |
|00005e80| 20 20 31 34 31 37 33 20 | 20 35 30 30 31 34 32 32 | 14173 | 5001422|
|00005e90| 35 34 33 20 20 31 30 34 | 30 31 00 20 30 00 00 00 |543 104|01. 0...|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 75 73 74 61 72 20 20 | 00 72 6f 6f 74 00 00 00 |.ustar |.root...|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006000| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00006010| 28 63 29 20 31 39 38 33 | 20 52 65 67 65 6e 74 73 |(c) 1983| Regents|
|00006020| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00006030| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00006040| 2e 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.. * All| rights |
|00006050| 72 65 73 65 72 76 65 64 | 2e 0a 20 2a 0a 20 2a 20 |reserved|.. *. * |
|00006060| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00006070| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00006080| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00006090| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|000060a0| 75 74 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|000060b0| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|000060c0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|000060d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000060e0| 6e 64 69 74 69 6f 6e 73 | 0a 20 2a 20 61 72 65 20 |nditions|. * are |
|000060f0| 6d 65 74 3a 0a 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|00006100| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|00006110| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00006120| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00006130| 63 6f 70 79 72 69 67 68 | 74 0a 20 2a 20 20 20 20 |copyrigh|t. * |
|00006140| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00006150| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00006160| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00006170| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 20 2a |g discla|imer.. *|
|00006180| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00006190| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|000061a0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|000061b0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000061c0| 72 69 67 68 74 0a 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|000061d0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|000061e0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|000061f0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|00006200| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0a |sclaimer| in the.|
|00006210| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00006220| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00006230| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00006240| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00006250| 74 72 69 62 75 74 69 6f | 6e 2e 0a 20 2a 20 33 2e |tributio|n.. * 3.|
|00006260| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00006270| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00006280| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00006290| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|000062a0| 66 74 77 61 72 65 0a 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|000062b0| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|000062c0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|000062d0| 64 67 65 6d 65 6e 74 3a | 0a 20 2a 09 54 68 69 73 |dgement:|. *.This|
|000062e0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|000062f0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|00006300| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|00006310| 65 72 73 69 74 79 20 6f | 66 0a 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00006320| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00006330| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00006340| 62 75 74 6f 72 73 2e 0a | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00006350| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00006360| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00006370| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00006380| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00006390| 72 73 0a 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|000063a0| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|000063b0| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|000063c0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000063d0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0a 20 | this so|ftware. |
|000063e0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|000063f0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.